M M E f f e c t   R e f e r e n c e 
 
 
 
 0 . 1 . 0 . 0   ( 2 0 1 0 / 9 / 1 8 )   f i r s t   e d i t i o n 
 
 0 . 2 . 0 . 0   ( 2 0 1 0 / 1 2 / 1 2 )   M M E   V e r 0 . 2 0 
 
    O F F S C R E E N R E N D E R T A R G E T   s e m a n t i c s   a d d e d 
 
 "   A d d i n g   C O N T R O L O B J E C T   s e m a n t i c s   c a n   b e   a c q u i r e d   i n f o r m a t i o n 
 
 "   T h e   e a s e   t h e   c o n s t r a i n t s   o f   d r a w i n g   o r d e r   o f   o b j e c t s   C O N T R O L O B J E C T   s e m a n t i c s   r e f e r e n c e s 
 
    E D G E C O L O R   s e m a n t i c s   a d d e d 
 
    V I E W P O R T P I X E L S I Z E   F i x e d   d e s c r i p t i o n   m i s t a k e   o f   s e m a n t i c s 
 
 "   S o m e   J a p a n e s e   m o d i f i c a t i o n 
 
 0 . 2 . 2 . 0   ( 2 0 1 0 / 1 2 / 1 6 )   M M E   V e r 0 . 2 2 
 
    R E N D E R C O L O R T A R G E T   a n d   i n   O F F S C R E E N R E N D E R T A R G E T   s e m a n t i c s ,   a n d   c h a n g e   h o w   t o   s p e c i f y   t h e   M i p l e v e l s 
 
 0 . 2 . 3 . 0   ( 2 0 1 0 / 1 2 / 2 0 )   M M E   V e r 0 . 2 3 
 
    S u p p l e m e n t a r y   p o s t s c r i p t   o f   C O N T R O L O B J E C T   s e m a n t i c s 
 
 0 . 2 . 4 . 0   ( 2 0 1 1 / 0 2 / 0 9 )   M M E   V e r 0 . 2 4 
 
 "   T h e   s p e c i a l   o b j e c t   n a m e   t h a t   c a n   b e   s p e c i f i e d   i n   C O N T R O L O B J E C T   s e m a n t i c s   A d d   " ( s e l f ) " 
 
    A d d   T E X T U R E V A L U E   s e m a n t i c s 
 
 0 . 2 . 6 . 0   ( 2 0 1 0 / 0 2 / 2 1 )   M M E   V e r 0 . 2 6 
 
    D r a w   =   G e o m e t r y   m o d i f y   t h e   d e s c r i p t i o n   o f   t h e   c o m m a n d 
 
 0 . 2 . 7 . 0   ( 2 0 1 1 / 0 5 / 2 2 )   M M E   V e r 0 . 2 7 
 
    _ I N D E X   S e m a n t i c s   a d d e d 
 
    V e r t e x C o u n t   A d d   p a r a m e t e r s   a n d   S u b s e t C o u n t   p a r a m e t e r s 
 
 "   A d d i n g   o p a d d   p a r a m e t e r s 
 
    T E X T U R E V A L U E   i s   a p p e n d e d   t o   t h e   s u p p l e m e n t   o f   s e m a n t i c s 
 
 0 . 2 . 8 . 0   ( 2 0 1 2 / 0 3 / 2 6 )   M M E   V e r 0 . 2 8 
 
    C O N T R O L O B J E C T   F i x e d   s o m e   d e s c r i p t i o n   o f   t h e   s e m a n t i c s 
 
 0 . 3 . 0 . 0   ( 2 0 1 2 / 0 9 / 1 9 )   M M E   V e r 0 . 3 0 
 
 T h a t   c a n   b e   s p e c i f i e d   i n   t h e      O F F S C R E E N R E N D E R T A R G E T   s e m a n t i c s   D e f a u l t E f f e c t 
 
 A d d   " m a i n _ d e f a u l t "   a s   a   s p e c i a l   e f f e c t   n a m e 
 
 0 . 3 . 3 . 0   ( 2 0 1 3 / 0 2 / 1 3 )   M M E   V e r 0 . 3 3 
 
 T e x t u r e   m a t e r i a l   m o r p h   f o r   s e m a n t i c s   o f   ( A D D I N G T E X T U R E ,   e t c . )   a d d 
 
    P M X   c o r r e s p o n d i n g   t o   t h e   s u b - t e x t u r e   o f   t h e   m o d e l   ( U s e S p h e r e M a p ,   u s e _ s p h e r e m a p ,   s e e   u s e _ s u b t e x t u r e ) 
 
    M A T E R I A L T O O N T E X T U R E   s e m a n t i c s   a d d e d 
 
    G R O U N D S H A D O W C O L O R   s e m a n t i c s   a d d e d 
 
    M M E _ M I P M A P   m a c r o   a d d e d 
 
 
 
 
 
 %  N o t e 
 
 "   I n   t h i s   r e f e r e n c e ,   M M E f f e c t   i s   d i s c u s s e s   r e c o g n i z e   s e m a n t i c s   a n d   a n n o t a t i o n . 
 
 F o r   r e f e r e n c e   o f   t h e   e f f e c t   f i l e   i t s e l f ,   s e e   b e l o w . 
 
 
 
 E f f e c t s   f i l e   f o r m a t   h t t p : / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 1 7 3 0 0 5 ( v = V S . 8 5 ) . a s p x 
 
 R e f e r e n c e   o f   H L S L   h t t p : / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 5 0 9 6 3 8 ( v = V S . 8 5 ) . a s p x 
 
 
 
 S e m a n t i c s   a n d   a n n o t a t i o n s   s p e c i f i c a t i o n   o f   d e v e l o p m e n t   w a s   t h e   N V I D I A   o f   S A S   t o   r e f e r e n c e . 
 
 h t t p : / / d e v e l o p e r . n v i d i a . c o m / o b j e c t / u s i n g _ s a s . h t m l 
 
 H o w e v e r ,   t h i s   i s   n o t   i n t e n d e d   t o   e n s u r e   t h a t   F X   e f f e c t   f i l e s   f o r   C o m p o s e r   o p e r a t e s . 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 
 1   t e c h n i q u e   a n d   p a t h 
 
 
 
 1 . 1   c o n f i g u r a t i o n 
 
 
 
 E f f e c t s   f i l e s ,   s u c h   a s ,   h a s   a   h i e r a r c h i c a l   s t r u c t u r e   b y   t e c h n i q u e s   a n d   p a t h . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
 P a r a m e t e r   d e c l a r a t i o n   1 
 
 P a r a m e t e r   d e c l a r a t i o n   2 
 
 . . . 
 
 
 
 t e c h n i q u e   t e c h n i q u e   1   { 
 
           p a s s   p a t h   1   { 
 
                   V e r t e x S h a d e r   =   . . . 
 
                   P i x e l S h a d e r   =   . . . 
 
           } 
 
           p a s s   p a s s   2   { 
 
                   V e r t e x S h a d e r   =   . . . 
 
                   P i x e l S h a d e r   =   . . . 
 
           } 
 
           . . . 
 
 } 
 
 
 
 t e c h n i q u e   t e c h n i q u e   2   { 
 
           p a s s   p a t h   1   { 
 
                   V e r t e x S h a d e r   =   . . . 
 
                   P i x e l S h a d e r   =   . . . 
 
           } 
 
           p a s s   p a s s   2   { 
 
                   V e r t e x S h a d e r   =   . . . 
 
                   P i x e l S h a d e r   =   . . . 
 
           } 
 
           . . . 
 
 } 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
 
 
 T e c h n i q u e   c o n s i s t s   o f   o n e   o r   m o r e   p a t h s . 
 
 O n e   p a t h   c o r r e s p o n d s   t o   o n e   o f   t h e   r e n d e r i n g   p r o c e s s , 
 
 I f   t h e   t e c h n i q u e   i s   c o m p o s e d   o f   m u l t i p l e   p a t h s , 
 
 T h e   t e c h n i q u e s   I   m e a n s   t h a t   u s e s   t h e   m u l t i - p a s s   r e n d e r i n g . 
 
 
 
 
 
 T h e   t e c h n i q u e s   a n d   p a t h ,   i t   i s   p o s s i b l e   t o   d e s c r i b e   a   s e t   v a l u e   c a l l e d   t h e   a n n o t a t i o n . 
 
 A n n o t a t i o n ,   a s   f o l l o w s ,   a f t e r   t h e   t e c h n i q u e   n a m e ,   p a t h   n a m e ,   d e s c r i b i n g   s o   a s   t o   s u r r o u n d   w i t h   " < "   a n d   " > " . 
 
 T h e   d i f f e r e n c e   b e t w e e n   t h e   c a s e   o f   t h e   a n n o t a t i o n   n a m e   i s   i g n o r e d . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * *   / 
 
 t e c h n i q u e   T e c h 1   < s t r i n g   S u b s e t   =   " 1 - 6 , 8 " ; >   { 
 
           p a s s   P a s s 1   < s t r i n g   S c r i p t   =   " D r a w   =   B u f f e r ; " ; >   { 
 
                   . . . 
 
           } 
 
           p a s s   P a s s 2   { 
 
                   . . . 
 
           } 
 
 } 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * *   / 
 
 
 
 M o r e o v e r ,   t h e   t e c h n i q u e s   a n d   p a t h ,   a n d   a   s p e c i a l   a n n o t a t i o n   c a l l e d   S c r i p t 
 
 C a n   b e   s p e c i f i e d .   T h i s   w i l l ,   I   d e s c r i b e d   i n    3 . 
 
 
 
 
 
 1 . 2   T e c h n i q u e s   a n n o t a t i o n s 
 
 
 
 T h e   a n n o t a t i o n   o f   t e c h n i q u e , 
 
 D e s c r i b e   o n e   o f   t h e   c o n d i t i o n s   t o   u s e   t h e   t e c h n i q u e   t o   d r a w   a n y   s c e n e . 
 
 
 
 
 
 T h i s   c o n d i t i o n ,   I   c a n   s p e c i f y   t h e   f o l l o w i n g . 
 
 
 
 O b j e c t s   s u b s e t   n u m b e r   o f   ( m a t e r i a l   n u m b e r   o f   R"  o b j e c t ) 
 
 A n d   d r a w i n g   o b j e c t   ( o b j e c t   b o d y   /   s h a d o w   /   o u t l i n e   /   s e l f - s h a d o w i n g   f o r   Z - v a l u e   p l o t ) 
 
 A n d   d r a w i n g   f l a g   ( t e x t u r e   u s e   O N   /   O F F ,   S p h e r e   m a p   u s e   O N   /   O F F ,   t o o n   r e n d e r i n g   u s e   O N   /   O F F ) 
 
 
 
 F o r   v e r i f i c a t i o n   o f   c o n d i t i o n s ,   t o   b e   p e r f o r m e d   i n   t h e   o r d e r   i n   w h i c h   t h e y   a r e   w r i t t e n   t o   t h e   e f f e c t   f i l e , 
 
 I f   t h e   c o n d i t i o n s   o f   u s e   a r e   o v e r l a p p e d   i n   s e v e r a l   t e c h n i q u e s , 
 
 T h o s e   d e s c r i b e d   e a r l i e r   i n   t h e   e f f e c t   f i l e   t a k e s   p r e c e d e n c e . 
 
 I f   t h e   t e c h n i q u e   f o r   t h i s   t y p e   d o e s   n o t   e x i s t   o n   t h e   e f f e c t s   f i l e , 
 
 M M D   s t a n d a r d   s h a d e r   i s   u s e d . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    S t r i n g   S u b s e t 
 
 I   s p e c i f y   t h e   n u m b e r   o f   s u b s e t s   t o   a p p l y   t h e   t e c h n i q u e . 
 
 F o r   P M D   m o d e l ,   w h i c h   c o r r e s p o n d s   t o   t h e   m o d e l   n u m b e r   o f   t h e   m a t e r i a l . 
 
 
 
 A t   t h e   t i m e   o f   a n n o t a t i o n   o m i t t e d ,   a l l   o f   t h e   s u b s e t   i s   a p p l i e d . 
 
 
 
 " 0 ,   3 ,   5 "   a s   i n ,   i t   i s   p o s s i b l e   t o   e n u m e r a t e   t h e   n u m b e r s   s e p a r a t e d   b y   c o m m a s ,   c a n   b e   s p e c i f i e d   m u l t i p l e   n u m b e r s . 
 
 I n   a d d i t i o n ,   " 6 - 1 0 "   a s   s u c h ,   i t   i s   p o s s i b l e   t o   c o n n e c t   a   n u m b e r   b y   a   h y p h e n ,   a n d   c a n   r a n g e   s p e c i f i e d . 
 
 " 1 2 "   a s   i n ,   i f   y o u   s p e c i f y   o n l y   t h e   s t a r t i n g   n u m b e r   f o r   t h e   r a n g e ,   a l l   o f   n u m b e r   o f   l a t e r   b e c o m e s   t h e   t a r g e t . 
 
 
 
 E x a m p l e :   s t r i n g   S u b s e t   =   " 0 - 6 , 8 " ; 
 
 
 
    S t r i n g   M M D P a s s 
 
 I   s p e c i f y   t h e   d r a w i n g   o b j e c t   t o   a p p l y   t h e   t e c h n i q u e . 
 
 S p e c i f y   o n e   o f   t h e   f o l l o w i n g .   T h i s   c l a s s i f i c a t i o n   i s   d e r i v e d   f r o m   t h e   p r o c e d u r e   o f   d r a w i n g   M M D . 
 
 
 
 " o b j e c t " :   o b j e c t   b o d y   ( s e l f - s h a d o w i n g   O F F ) 
 
 " z p l o t " :   s e l f - s h a d o w i n g   f o r   Z - v a l u e   p l o t 
 
 " o b j e c t _ s s " :   o b j e c t   b o d y   ( s e l f - s h a d o w i n g   O N ) 
 
 " s h a d o w " :   s h a d o w   ( S i m p l e   s h a d o w   i s   n o t   a   s e l f - s h a d o w i n g ) 
 
 " e d g e " :   o u t l i n e   ( P M D   m o d e l s   o n l y ) 
 
 
 
 D u r i n g   t h e   a n n o t a t i o n   i s   o m i t t e d ,   i t   i s   c o n s i d e r e d   t o   h a v e   a   s p e c i f i e d   " o b j e c t " . 
 
 
 
 E x a m p l e :   s t r i n g   M M D P a s s   =   " o b j e c t " ; 
 
 
 
    B o o l   U s e T e x t u r e 
 
 I   s p e c i f y   t h e   p r e s e n c e   o r   a b s e n c e   o f   t e x t u r e   u s e . 
 
 T h e   t e c h n i q u e   i s ,   w h e n   i t   i s   i n t e n d e d   f o r   o n l y   a   s u b s e t   t h a t   u s e s   t e x t u r e   s p e c i f i e s   a   t r u e . 
 
 C o n v e r s e l y ,   i f   i t   i s   i n t e n d e d   f o r   o n l y   a   s u b s e t   t h a t   d o e s   n o t   u s e   t e x t u r e ,   s p e c i f y   f a l s e . 
 
 
 
 D u r i n g   t h e   a n n o t a t i o n   i s   o m i t t e d ,   t h e   p r e s e n c e   o r   a b s e n c e   o f   t e x t u r e   i s   i g n o r e d . 
 
 
 
 E x a m p l e :   b o o l   U s e T e x t u r e   =   t r u e ; 
 
 
 
    B o o l   U s e S p h e r e M a p 
 
 I   s p e c i f y   t h e   p r e s e n c e   o r   a b s e n c e   o f   a   s p h e r e   m a p   u s e . 
 
 A s   t e c h n i q u e s ,   o n l y   t h e   c a s e   o f   a   t a r g e t   s u b s e t   u s i n g   t h e   s p h e r e   m a p p i n g   s p e c i f i e s   t r u e . 
 
 ( I n   P M X   m o d e l ,   i n c l u d i n g   e v e n   i f   y o u   s p e c i f y   a   s u b - t e x t u r e   t o   S p h e r e   m o d e ) 
 
 C o n v e r s e l y ,   i f   i t   i s   i n t e n d e d   f o r   o n l y   a   s u b s e t   t h a t   d o e s   n o t   u s e   t h e   s p h e r e   m a p ,   s p e c i f y   f a l s e . 
 
 
 
 D u r i n g   t h e   a n n o t a t i o n   i s   o m i t t e d ,   t h e   p r e s e n c e   o r   a b s e n c e   o f   s p h e r e   m a p p i n g   i s   i g n o r e d . 
 
 
 
 E x a m p l e :   b o o l   U s e S p h e r e M a p   =   f a l s e ; 
 
 
 
    B o o l   U s e T o o n 
 
 I   s p e c i f y   t h e   p r e s e n c e   o r   a b s e n c e   o f   C e l   s h a d i n g   u s e . 
 
 T h e   t e c h n i q u e   i s ,   i n   t h e   c a s e   o f   i n t e r e s t   t h e   o b j e c t   ( =   P M D   m o d e l )   t o   u s e   t h e   t o o n   r e n d e r i n g ,   I   s p e c i f y   t h e   t r u e . 
 
 C o n v e r s e l y ,   i f   i t   i s   i n t e n d e d   f o r   o b j e c t s   t h a t   d o   n o t   u s e   C e l   s h a d i n g   ( =   a c c e s s o r y ) ,   s p e c i f y   f a l s e . 
 
 
 
 A t   t h e   t i m e   o f   a n n o t a t i o n   o m i t t e d ,   t h e   p r e s e n c e   o r   a b s e n c e   o f   C e l   s h a d i n g   u s e   i s   i g n o r e d . 
 
 
 
 E x a m p l e :   b o o l   U s e T o o n   =   t r u e ; 
 
 
 
 
 
 %  u s e   c a s e s 
 
         
 
           / /   I f   s e l f - s h a d o w i n g   i s   O N ,   t h e   s u b s e t   o f   N o . 0   ~   6   a n d   N o . 8 ,   i s   a p p l i e d   T e c h 1 , 
 
           / /   T h e   N o . 7   a n d   N o . 9   ~   s u b s e t ,   T e c h 2   i s   a p p l i e d . 
 
           / /   I f   s e l f - s h a d o w i n g   i s   O F F ,   a r e   a p p l i e d   T e c h 3 . 
 
 
 
           t e c h n i q u e   T e c h 1   < 
 
                   s t r i n g   M M D P a s s   =   " o b j e c t _ s s " ; 
 
                   s t r i n g   S u b s e t   =   " 0 - 6 , 8 " ; 
 
           >   { 
 
                   . . . 
 
           } 
 
 
 
           t e c h n i q u e   T e c h 2   < 
 
                   s t r i n g   M M D P a s s   =   " o b j e c t _ s s " ; 
 
                   s t r i n g   S u b s e t   =   " 7 , 9 - " ; 
 
           >   { 
 
                   . . . 
 
           } 
 
 
 
           t e c h n i q u e   T e c h 3   < 
 
                   s t r i n g   M M D P a s s   =   " o b j e c t " ; 
 
           >   { 
 
                   . . . 
 
           } 
 
 
 
 %  s u p p l e m e n t 
 
    R e a s o n a b l e   a n d   n o t   t e c h n i q u e   a r e   e x c l u d e d . 
 
 h t t p : / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 2 0 6 3 2 4 ( v = V S . 8 5 ) . a s p x 
 
    M M D P a s s   =   " o b j e c t " ,   i n   t h e   t e c h n i q u e   o t h e r   t h a n   " o b j e c t _ s s " ,   U s e T e x t u r e ,   U s e S p h e r e M a p ,   U s e T o o n   n o t   f u n c t i o n   c o r r e c t l y . 
 
 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 
 2   p a r a m e t e r s   o f   s e m a n t i c s   a n d   a n n o t a t i o n s 
 
 
 
 I n   t h e   f o l l o w i n g ,   I   c a n   b e   u s e d   i n   t h e   e f f e c t   f i l e   f o r   M M E f f e c t , 
 
 A b o u t   t h e   p a r a m e t e r s   o f   s e m a n t i c s   a n d   a n n o t a t i o n s   I   d e s c r i b e d . 
 
 
 
 B y   m o d i f y i n g   t h e   d e c l a r a t i o n   o f   p a r a m e t e r s   i n   t h e   s e m a n t i c s   a n d   a n n o t a t i o n , 
 
 A   v a r i e t y   o f   i n f o r m a t i o n   n e c e s s a r y   t o   r e n d e r ,   c a n   b e   r e t r i e v e d   t o   b e   c o n s t r u e d   i t s   p a r a m e t e r s . 
 
 
 
 
 
 P a r a m e t e r s   o f   s e m a n t i c s   a n d   a n n o t a t i o n s ,   d e s c r i b e d   a s   f o l l o w s . 
 
 
 
         M o d e l   P a r a m e t e r   n a m e :   S e m a n t i c s   n a m e   < t y p e   n a m e   a n n o t a t i o n   1   =   v a l u e ;   t y p e   n a m e   a n n o t a t i o n   2   =   v a l u e ;   . . . > ; 
 
 
 
 D e p e n d i n g   o n   t h e   s e m a n t i c s ,   a n d   s o m e   y o u   d o   n o t   s p e c i f y   t h e   a n n o t a t i o n . 
 
 
 
 
 
 T h e   d i f f e r e n c e   b e t w e e n   t h e   c a s e   o f   s e m a n t i c s   n a m e   a n d   t h e   a n n o t a t i o n   n a m e   i s   i g n o r e d . 
 
 
 
 
 
 2 . 1   g e o m e t r y   t r a n s f o r m a t i o n 
 
 R e f e r e n c e :   h t t p :   / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 2 0 6 2 6 9   ( v   =   V S . 8 5 )   . a s p x 
 
 
 
 %  W O R L D 
 
 %  V I E W 
 
 %  P R O J E C T I O N 
 
 %  W O R L D V I E W 
 
 %  V I E W P R O J E C T I O N 
 
 %  W O R L D V I E W P R O J E C T I O N 
 
 
 
 T r a n s f o r m a t i o n   m a t r i x   t o   b e   u s e d   f o r   c o o r d i n a t e   t r a n s f o r m a t i o n   o f   t h e   v e r t e x . 
 
 
 
 T h e   c o o r d i n a t e   t r a n s f o r m a t i o n ,   t h e r e   i s   a   w o r l d   t r a n s f o r m a t i o n ,   v i e w   t r a n s f o r m a t i o n ,   p r o j e c t i o n   t r a n s f o r m a t i o n   ( h o m o g r a p h y ) . 
 
 
 
       S i x   o f   s e m a n t i c s ,   r e s p e c t i v e l y , 
 
 W O R L D :   w o r l d   t r a n s f o r m a t i o n   m a t r i x 
 
 V I E W :   v i e w   t r a n s f o r m a t i o n   m a t r i x 
 
 P R O J E C T I O N :   P r o j e c t i o n   t r a n s f o r m a t i o n   m a t r i x 
 
 W O R L D V I E W :   w o r l d   t r a n s f o r m a t i o n   m a t r i x      v i e w   t r a n s f o r m a t i o n   m a t r i x 
 
 V I E W P R O J E C T I O N :   v i e w   t r a n s f o r m a t i o n   m a t r i x      p r o j e c t i o n   t r a n s f o r m a t i o n   m a t r i x 
 
 W O R L D V I E W P R O J E C T I O N :   w o r l d   t r a n s f o r m a t i o n   m a t r i x      v i e w   t r a n s f o r m a t i o n   m a t r i x      p r o j e c t i o n   t r a n s f o r m a t i o n   m a t r i x 
 
 T h e   I   r e p r e s e n t . 
 
 T y p e   f l o a t 4 x 4 . 
 
 
 
 A s   " W O R L D I N V E R S E " ,   w h e n   a d d i n g   " I N V E R S E "   t o   t h e   e n d   o f   t h e   s e m a n t i c s ,   t h e   i n v e r s e   m a t r i x   o f   t h e   m a t r i x   i s   o b t a i n e d . 
 
 A l s o ,   a s   i n   t h e   " W O R L D T R A N S P O S E " ,   w h e n   a d d i n g   " T R A N S P O S E "   t o   t h e   e n d ,   t h e   t r a n s p o s e d   m a t r i x   o f   t h e   m a t r i x   i s   o b t a i n e d . 
 
 I n   o r d e r   t o   o b t a i n   t h e   t r a n s p o s e d   m a t r i x   o f   t h e   i n v e r s e   m a t r i x ,   a d d i n g   " I N V E R S E T R A N S P O S E "   a t   t h e   e n d . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   O b j e c t   ( o p t i o n a l ) 
 
 I n   v i e w   t r a n s f o r m a t i o n   a n d   p r o j e c t i o n   c o n v e r s i o n ,   I   w i l l   s p e c i f y   w h e r e   o r   t o   t h e   v i e w p o i n t . 
 
 " C a m e r a "   o r   " L i g h t "   c a n   b e   s p e c i f i e d .   T h e   d e f a u l t   i s   " C a m e r a " . 
 
 
 
 N o r m a l l y ,   i n   t h e   c a s e   p e r f o r m s   c o o r d i n a t e   t r a n s f o r m a t i o n   t h a t   t h e   v i e w p o i n t   o f   t h e   c a m e r a ,   I   s p e c i f y   t h e   " C a m e r a " . 
 
 Z   v a l u e   p l o t ,   e t c .   f o r   s e l f - s h a d o w i n g ,   w h e n   t h e   s o u r c e   p e r f o r m s   c o o r d i n a t e   t r a n s f o r m a t i o n s   a n d   v i e w p o i n t ,   I   s p e c i f y   t h e   " L i g h t " . 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 4 x 4   W o r l d M a t r i x :   W O R L D ; 
 
           f l o a t 4 x 4   W o r l d V i e w P r o j M a t r i x :   W O R L D V I E W P R O J E C T I O N ; 
 
           f l o a t 4 x 4   L i g h t V i e w M a t r i x :   V I E W   < s t r i n g   O b j e c t   =   " L i g h t " ; > ; 
 
           f l o a t 4 x 4   W o r l d I n v M a t r i x :   W O R L D I N V E R S E ; 
 
           f l o a t 4 x 4   W o r l d V i e w P r o j T r a n s M a t r i x :   W O R L D V I E W P R O J E C T I O N T R A N S P O S E ; 
 
 
 
 %  s u p p l e m e n t 
 
 I t   i s   t h e   m a t r i x   t h a t   o b t a i n e d   w h e n   y o u   h a v e   s p e c i f i e d   t h e   " L i g h t "   i n      O b j e c t   a n n o t a t i o n , 
 
 B e c a u s e   i t   i s   i n   c o n j u n c t i o n   w i t h   t h e   m a t r i x   y o u   a r e   u s i n g   s e l f - s h a d o w i n g   o f   M M D , 
 
 [ D i s p l a y   ( V ) ]   -   i n   t h e   s e l f - s h a d o w i n g   D i s p l a y   ( P ) ] ,   w h e n   f u l l y   w o u l d   O F F   t h e   s e l f - s h a d o w i n g   f u n c t i o n , 
 
 I   w i l l   n o t   b e   a b l e   t o   s e e   t h e   c o r r e c t   v a l u e . 
 
 
 
 
 
 2 . 2   L i g h t   a n d   m a t e r i a l s 
 
 R e f e r e n c e :   h t t p :   / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 1 7 4 6 9 4   ( v   =   V S . 8 5 )   . a s p x 
 
 
 
 %  D I F F U S E 
 
 %  A M B I E N T 
 
 %  E M I S S I V E 
 
 %  S P E C U L A R 
 
 %  S P E C U L A R P O W E R 
 
 %  T O O N C O L O R 
 
 %  E D G E C O L O R 
 
 %  G R O U N D S H A D O W C O L O R 
 
 
 
 C o l o r   v a l u e s   o f   m a t e r i a l   o f   3 D   o b j e c t s   ( m a t e r i a l )   o r   c o l o r   v a l u e s   o f   l i g h t , . 
 
 
 
 S i x   o f   s e m a n t i c s ,   r e s p e c t i v e l y , 
 
 D I F F U S E :   d i f f u s e   c o l o r   ( d i f f u s e d   l i g h t ) 
 
 A M B I E N T :   A m b i e n t   c o l o r   ( a m b i e n t   l i g h t ) 
 
 E M I S S I V E :   e m i s s i o n   c o l o r   ( s y n c h r o t r o n   r a d i a t i o n ) 
 
 S P E C U L A R :   S p e c u l a r   c o l o r   ( s p e c u l a r ) 
 
 S P E C U L A R P O W E R :   t h e   i n t e n s i t y   o f   t h e   s p e c u l a r 
 
 T O O N C O L O R :   T h u n   c o l o r 
 
 E D G E C O L O R :   o u t l i n e   c o l o r 
 
 G R O U N D S H A D O W C O L O R :   g r o u n d   s h a d o w   c o l o r 
 
 T h e   I   r e p r e s e n t . 
 
 
 
 T h u n   c o l o r ,   r e p r e s e n t   i n   C e l   s h a d i n g   o f   P M D   m o d e l ,   t h e   s h a d o w   o f   c o l o r   ( s p e c i f i c a l l y ,   t o o n   ? ? .   B m p   l o w e r   l e f t   c o r n e r   o f   t h e   c o l o r   o f ) . 
 
 
 
 T y p e ,   " S P E C U L A R P O W E R "   o n l y   i n   t h e   f l o a t ,   o t h e r w i s e   t h e r e   f l o a t 3   o r   f l o a t 4 . 
 
 T h e   c o l o r   i s   c o m p o s e d   o f   f o u r   c o m p o n e n t s   ( r e d ,   g r e e n ,   b l u e ,   a n d   a l p h a   ( t r a n s p a r e n c y ) ) .   A l p h a   v a l u e   i s   o m i t t e d   I f   y o u   s p e c i f y   a   f l o a t 3   t o   t y p e . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   O b j e c t   ( r e q u i r e d ) 
 
 A n d   l i g h t   c o l o r ,   a n d   s p e c i f y   w h e t h e r   t o   r e t r i e v e   e i t h e r   t h e   m a t e r i a l   c o l o r   o f   t h e   o b j e c t . 
 
 " L i g h t "   o r   " G e o m e t r y "   c a n   b e   s p e c i f i e d . 
 
 
 
 T o   g e t   t h e   m a t e r i a l   c o l o r   o f   t h e   o b j e c t ,   s p e c i f y   t h e   " G e o m e t r y " . 
 
 T o   g e t   a   l i g h t   c o l o r ,   t o   s p e c i f y   t h e   " L i g h t " . 
 
 T h e   " S P E C U L A R P O W E R "   a n d   " E M I S S I V E "   a n d   " T O O N C O L O R " ,   b e c a u s e   t h e r e   i s   n o   l i g h t   c o l o r ,   " L i g h t "   c a n   n o t   b e   s p e c i f i e d . 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 4   M a t e r i a l D i f f u s e :   D I F F U S E   < s t r i n g   O b j e c t   =   " G e o m e t r y " ; > ; 
 
           f l o a t 3   M a t e r i a l A m b i e n t :   A M B I E N T   < s t r i n g   O b j e c t   =   " G e o m e t r y " ; > ; 
 
           f l o a t 3   M a t e r i a l E m m i s i v e :   E M I S S I V E   < s t r i n g   O b j e c t   =   " G e o m e t r y " ; > ; 
 
           f l o a t 3   M a t e r i a l S p e c u l a r :   S P E C U L A R   < s t r i n g   O b j e c t   =   " G e o m e t r y " ; > ; 
 
           f l o a t   S p e c u l a r P o w e r :   S P E C U L A R P O W E R   < s t r i n g   O b j e c t   =   " G e o m e t r y " ; > ; 
 
           f l o a t 3   M a t e r i a l T o o n :   T O O N C O L O R ; 
 
           f l o a t 3   E d g e C o l o r :   E D G E C O L O R ; 
 
           f l o a t 3   L i g h t D i f f u s e :   D I F F U S E   < s t r i n g   O b j e c t   =   " L i g h t " ; > ; 
 
           f l o a t 3   L i g h t A m b i e n t :   A M B I E N T   < s t r i n g   O b j e c t   =   " L i g h t " ; > ; 
 
           f l o a t 3   L i g h t S p e c u l a r :   S P E C U L A R   < s t r i n g   O b j e c t   =   " L i g h t " ; > ; 
 
           s t a t i c   f l o a t 4   D i f f u s e C o l o r   =   M a t e r i a l D i f f u s e   *   f l o a t 4   ( L i g h t D i f f u s e ,   1 . 0 f ) ; 
 
           s t a t i c   f l o a t 3   A m b i e n t C o l o r   =   M a t e r i a l A m b i e n t   *   L i g h t A m b i e n t   +   M a t e r i a l E m m i s i v e ; 
 
           s t a t i c   f l o a t 3   S p e c u l a r C o l o r   =   M a t e r i a l S p e c u l a r   *   L i g h t S p e c u l a r ; 
 
 f l o a t 4   G r o u n d S h a d o w C o l o r :   G R O U N D S H A D O W C O L O R ; 
 
 
 
 %  s u p p l e m e n t 
 
    O u t l i n e   c o l o r   o n l y   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " e d g e " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 - G r o u n d   s h a d o w   c o l o r   o n l y   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " s h a d o w " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 O t h e r   e a c h   c o l o r   v a l u e   o f ,   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " z p l o t "   o r   M M D P a s s   =   " e d g e " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 
 
 
 
 %  P O S I T I O N 
 
 %  D I R E C T I O N 
 
 
 
 O f   l i g h t   o r   c a m e r a ,   t h e   p o s i t i o n   a n d   o r i e n t a t i o n   w i t h i n   t h e   w o r l d   s p a c e . 
 
 T y p e   i s   a   f l o a t 3   o r   f l o a t 4 . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   O b j e c t   ( r e q u i r e d ) 
 
 S p e c i f i e s   w h e t h e r   t o   a c q u i r e   e i t h e r   t h e   c o o r d i n a t e s   o f   t h e   c a m e r a   a n d   l i g h t . 
 
 " C a m e r a "   o r   " L i g h t "   c a n   b e   s p e c i f i e d . 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 3   L i g h t D i r e c t i o n :   D I R E C T I O N   < s t r i n g   O b j e c t   =   " L i g h t " ; > ; 
 
           f l o a t 3   C a m e r a P o s i t i o n :   P O S I T I O N   < s t r i n g   O b j e c t   =   " C a m e r a " ; > ; 
 
 
 
 %  s u p p l e m e n t 
 
 F o r      M M D   o f   l i g h t s ,   i s   a   d i r e c t i o n a l   l i g h t , 
 
 P o s i t i o n   c o o r d i n a t e s   o f   t h e   l i g h t ,   a n   i n f i n i t e   f a r   p o i n t   d i r e c t i o n   o p p o s i t e   t o   t h e   d i r e c t i o n   o f   t h e   l i g h t . 
 
 
 
 
 
 %  M A T E R I A L T E X T U R E 
 
 
 
 T e x t u r e   i s   s e t   t o   t h e   m a t e r i a l . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           t e x t u r e   O b j e c t T e x t u r e :   M A T E R I A L T E X T U R E ; 
 
         
 
           s a m p l e r   O b j T e x S a m p l e r   =   s a m p l e r _ s t a t e 
 
           { 
 
                   t e x t u r e   =   < O b j e c t T e x t u r e > ; 
 
                   M I N F I L T E R   =   L I N E A R ; 
 
                   M A G F I L T E R   =   L I N E A R ; 
 
                   M I P F I L T E R   =   L I N E A R ; 
 
                   A D D R E S S U   =   W R A P ; 
 
                   A D D R E S S V   =   W R A P ; 
 
           } ; 
 
           / /   T e x 2 D   ( O b j T e x S a m p l e r ,   f l o a t 2   ( x ,   y ) )   I   c a n   s e e   t h e   c o n t e n t s   i n 
 
 
 
 %  s u p p l e m e n t 
 
 "   E a c h   c o l o r   v a l u e ,   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " z p l o t "   o r   M M D P a s s   =   " e d g e " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 
 
 %  M A T E R I A L S P H E R E M A P 
 
 I s   s e t   t o   t h e   m a t e r i a l ,   s p h e r e   m a p   t e x t u r e . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           t e x t u r e   O b j e c t S p h e r e M a p :   M A T E R I A L S P H E R E M A P ; 
 
         
 
           s a m p l e r   O b j S p h S a m p l e r   =   s a m p l e r _ s t a t e 
 
           { 
 
                   t e x t u r e   =   < O b j e c t S p h e r e M a p > ; 
 
                   M I N F I L T E R   =   L I N E A R ; 
 
                   M A G F I L T E R   =   L I N E A R ; 
 
                   M I P F I L T E R   =   L I N E A R ; 
 
                   A D D R E S S U   =   W R A P ; 
 
                   A D D R E S S V   =   W R A P ; 
 
           } ; 
 
           / /   T e x 2 D   ( O b j S p h S a m p l e r ,   f l o a t 2   ( x ,   y ) )   I   c a n   s e e   t h e   c o n t e n t s   i n 
 
 
 
 %  s u p p l e m e n t 
 
 "   E a c h   c o l o r   v a l u e ,   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " z p l o t "   o r   M M D P a s s   =   " e d g e " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 
 
 %  M A T E R I A L T O O N T E X T U R E 
 
 
 
 I s   s e t   t o   t h e   m a t e r i a l ,   T h u n   m a p   t e x t u r e . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           t e x t u r e   O b j e c t T o o n T e x t u r e :   M A T E R I A L T O O N T E X T U R E ; 
 
         
 
           s a m p l e r   O b j T o o n S a m p l e r   =   s a m p l e r _ s t a t e 
 
           { 
 
                   t e x t u r e   =   < O b j e c t S p h e r e M a p > ; 
 
                   M I N F I L T E R   =   L I N E A R ; 
 
                   M A G F I L T E R   =   L I N E A R ; 
 
                   M I P F I L T E R   =   N O N E ; 
 
                   A D D R E S S U   =   C L A M P ; 
 
                   A D D R E S S V   =   C L A M P ; 
 
           } ; 
 
           / /   T e x 2 D   ( O b j T o o n S a m p l e r ,   f l o a t 2   ( x ,   y ) )   I   c a n   s e e   t h e   c o n t e n t s   i n 
 
 
 
 %  s u p p l e m e n t 
 
 "   E a c h   c o l o r   v a l u e ,   i n   t h e   T e c h n i q u e   o f   M M D P a s s   =   " z p l o t "   o r   M M D P a s s   =   " e d g e " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
 M o r e o v e r ,   w h e n   t h e   a c c e s s o r y   ( f o r   U s e T o o n   =   f a l s e )   i s   n o t   c o r r e c t l y   a c q u i r e d . 
 
    I n   P M D   m o d e l ,   i n   t h e   c a s e   o f   m a t e r i a l s   t h a t   d o   n o t   u s e   T h u n ,   i t   i s   e n t i r e l y   w h i t e   t e x t u r e . 
 
 
 
 %  A D D I N G T E X T U R E 
 
 %  M U L T I P L Y I N G T E X T U R E 
 
 %  A D D I N G S P H E R E T E X T U R E 
 
 %  M U L T I P L Y I N G S P H E R E T E X T U R E 
 
 
 
 F o r   P M X   m a t e r i a l   m o r p h ,   w i t h   r e s p e c t   t o   t h e   t e x t u r e   o f   t h e   t e x t u r e   a n d   s p h e r e   m a p p i n g , 
 
 A d d e d   v a l u e   a n d   m u l t i p l i c a t i o n   v a l u e . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 4   T e x t u r e A d d V a l u e :   A D D I N G T E X T U R E ; 
 
           f l o a t 4   T e x t u r e M u l V a l u e :   M U L T I P L Y I N G T E X T U R E ; 
 
           f l o a t 4   S p h e r e A d d V a l u e :   A D D I N G S P H E R E T E X T U R E ; 
 
           f l o a t 4   S p h e r e M u l V a l u e :   M U L T I P L Y I N G S P H E R E T E X T U R E ; 
 
 
 
 %  s u p p l e m e n t 
 
 "   E a c h   v a l u e   i s   o n l y   i n   t h e   c a s e   o f   M M D P a s s   =   " o b j e c t _ s s " ,   c a n   n o t   b e   p r o p e r l y   o b t a i n e d . 
 
    I n   a d d i t i o n ,   ( i n   t h e   c a s e   o f   U s e T o o n   =   f a l s e )   c a s e   o f   a c c e s s o r i e s ,   a l l   a d d i n g   v a l u e   i s   0 ,   b e c o m e   a l l   m u l t i p l i c a t i o n   v a l u e   i s   1 . 
 
 
 
 
 
 2 . 3   s c r e e n   i n f o r m a t i o n 
 
 
 
 %  V I E W P O R T P I X E L S I Z E 
 
 
 
 S c r e e n   s i z e   o f   t h e   r e n d e r   t a r g e t . 
 
 T y p e   f l o a t 2 .   I n   p i x e l s . 
 
 
 
 ;   T h i s   v a l u e   r e f e r s   t o   t h e   s i z e   o f   t h e   s c r e e n   o r   o f f - s c r e e n   r e n d e r   t a r g e t   o f   M M D . 
 
 I n   S c r i p t s   o f   " R e n d e r C o l o r T a r g e t "   c o m m a n d ,   i f   y o u   c h a n g e   t h e   r e n d e r   t a r g e t , 
 
 T h i s   v a l u e   d o e s   n o t   c h a n g e . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 2   S c r e e n S i z e :   V I E W P O R T P I X E L S I Z E ; 
 
 
 
 %  s u p p l e m e n t 
 
    I n t e r n a l l y ,   I ' m   r e f e r r i n g   t o   t h e   v a l u e   o f   . W i d t h   a n d   . H e i g h t   o f   V i e w p o r t . 
 
 
 
 
 
 2 . 4   h o u r s 
 
 
 
 %  T I M E 
 
 %  E L A P S E D T I M E 
 
 
 
 T i m e   i n f o r m a t i o n . 
 
 T y p e   f l o a t .   I n   s e c o n d s . 
 
 
 
 " T I M E "   r e p r e s e n t s   t h e   p l a y b a c k   t i m e   f r o m   0 - t h   f r a m e . 
 
 F o r   e x a m p l e ,   t h e   0 - t h   f r a m e ,   0 . 0   ( s e c o n d s ) ,   a n d   t h e   1 . 5   ( s e c )   i n   4 5   t h   f r a m e . 
 
 
 
 " E L A P S E D T I M E "   r e p r e s e n t s   t h e   e l a p s e d   t i m e   f r o m   t h e   p r e v i o u s   d r a w i n g . 
 
 F o r   e x a m p l e ,   w h e n   t h e   A V I   o u t p u t   a t   6 0 f p s ,   t h e   v a l u e   o f   " E L A P S E D T I M E " ,   i t   b e c o m e s   c o n s t a n t   a t   1 / 6 0 . 
 
 
 
 %  a n n o t a t i o n 
 
    B o o l   S y n c I n E d i t M o d e   ( o p t i o n a l ) 
 
 E v e n   i f   M M D   i s   i n   e d i t   m o d e ,   y o u   s p e c i f y   w h e t h e r   t o   w o r k   w i t h   t h e   f r a m e . 
 
 I   s p e c i f y   a   t r u e   o r   f a l s e .   T h e   d e f a u l t   i s   f a l s e . 
 
 
 
 S i n c e   M M D   i s   a t   t h e   e d i t   m o d e ,   t h e   r e p r o d u c t i o n   o f   t h e   f r a m e   i s   s t o p p e d , 
 
 W h e n   t h e   v a l u e   o f   T I M E   i s   a l w a y s   i n   c o n j u n c t i o n   w i t h   t h e   f r a m e   t i m e , 
 
 I n   e d i t   m o d e ,   e v e n   a n i m a t i o n s   u s i n g   t h i s   v a l u e   w i l l   b e   s t o p p e d . 
 
 
 
 I f   f a l s e   i s   s p e c i f i e d   i n   t h i s   a n n o t a t i o n , 
 
 E d i t i n g   m o d e ,   t h e   v a l u e   o f   T I M E   a n d   E L A P S E D T I M E ,   n o t   t h e   f r a m e   t i m e   i s   t h e   s y s t e m   t i m e   i s   u s e d . 
 
 A s   a   r e s u l t ,   t h e   a n i m a t i o n   w i l l   n o t   s t o p   e v e n   d u r i n g   t h e   e d i t i n g   m o d e . 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t   f t i m e :   T I M E   < b o o l   S y n c I n E d i t M o d e   =   t r u e ; > ; 
 
           f l o a t   e l a p s e d _ t i m e :   E L A P S E D T I M E ; 
 
           s t a t i c   f l o a t   f p s   =   1 . 0   /   e l a p s e d _ t i m e ; 
 
 
 
 %  s u p p l e m e n t 
 
    S y n c I n E d i t M o d e   =   I f   t r u e ,   t h e   v a l u e   o f   E L A P S E D T I M E   i s ,   b y   t h e   f r a m e   m o v e   o p e r a t i o n   o n   t h e   M M D ,   c a n   b e   a   0   o r   n e g a t i v e . 
 
 
 
 
 
 2 . 5   m o u s e 
 
 
 
 %  M O U S E P O S I T I O N 
 
 
 
 C u r r e n t   p o s i t i o n   o f   t h e   m o u s e . 
 
 T y p e   f l o a t 2 . 
 
 
 
 T h e   c e n t e r   o f   t h e   d r a w i n g   a r e a   o f   t h e   M M D   i s   a   ( 0 , 0 ) ,   t h e   l o w e r   l e f t   c o r n e r   ( - 1 ,   - 1 ) ,   m a d e   i n   t h e   u p p e r   r i g h t   c o r n e r   i s   ( 1 , 1 ) . 
 
 H o w   t o   t a k e   t h i s   x y   c o o r d i n a t e s ,   a f t e r   t h e   p r o j e c t i o n   t r a n s f o r m a t i o n ,   i s   t h e   s a m e   a s   t h e   v e r t e x   c o o r d i n a t e s . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 2   p o s :   M O U S E P O S I T I O N ; 
 
 
 
 
 
 %  L E F T M O U S E D O W N 
 
 %  M I D D L E M O U S E D O W N 
 
 %  R I G H T M O U S E D O W N 
 
 
 
 I n f o r m a t i o n   a b o u t   t h e   m o u s e   b u t t o n . 
 
 T y p e   f l o a t 4 . 
 
 
 
 C a n   b e   a c q u i r e d   v a l u e s ,   c o n s i s t s   o f   t h e   f o l l o w i n g   f o u r   c o m p o n e n t s . 
 
    F i n a l l y   t h e   m o u s e   w h e n   t h e   b u t t o n   i s   p r e s s e d   i n   t h e   c o o r d i n a t e s   ( x   a n d   y ) 
 
 -   C u r r e n t   o r   b u t t o n   i s   p r e s s e d   ( 0   o r   1 ) 
 
 -   F i n a l l y   T I M E   v a l u e   a t   t h e   t i m e   t h e   b u t t o n   i s   p r e s s e d   ( i n   s e c o n d s ) 
 
 
 
 I n   a d d i t i o n ,   h o w   t o   t a k e   t h e   m o u s e   c o o r d i n a t e s ,   i s   t h e   s a m e   a s   t h e   M O U S E P O S I T I O N . 
 
 
 
 %  a n n o t a t i o n 
 
 N o n e 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 4   m o u s e _ d o w n :   L E F T M O U S E D O W N ; 
 
           s t a t i c   f l o a t 2   p o s   =   m o u s e _ d o w n . x y ; 
 
           s t a t i c   b o o l   i s _ p r e s s e d   =   ( !   m o u s e _ d o w n . z   =   0 ) ; 
 
 
 
 
 
 2 . 6   C o n t r o l   O b j e c t s 
 
 
 
 %  C O N T R O L O B J E C T 
 
 
 
 O f   t h e   s p e c i f i e d   o b j e c t ,   I   g e t   t h e   c o o r d i n a t e s   a n d   w o r l d   t r a n s f o r m a t i o n   m a t r i x . 
 
 M a i n l y ,   t o   b e   u s e d   i f   y o u   w a n t   t o   c o n t r o l   t h e   p a r a m e t e r s   n e c e s s a r y   t o   t h e   s h a d e r   f r o m   t h e   M M D . 
 
 
 
 T y p e   b o o l ,   f l o a t ,   f l o a t 3 ,   f l o a t 4   o r   f l o a t 4 x 4 . 
 
 
 
 T h e   t y p e   t o   b e   u s e d ,   c a n   b e   a c q u i r e d   i n f o r m a t i o n   i s   d i f f e r e n t . 
 
 
 
    B o o l 
 
 W h e t h e r   o r   n o t   t h e   s p e c i f i e d   o b j e c t   i s   d i s p l a y e d 
 
    F l o a t 
 
 S c a l i n g   v a l u e   o f   t h e   s p e c i f i e d   o b j e c t 
 
    F l o a t 3 ,   f l o a t 4 
 
 C o o r d i n a t e s   o f   t h e   s p e c i f i e d   o b j e c t   ( o f f s e t ) 
 
    F l o a t 4 x 4 
 
 W o r l d   t r a n s f o r m a t i o n   m a t r i x   o f   t h e   s p e c i f i e d   o b j e c t 
 
 
 
 A l s o ,   b y   s p e c i f y i n g   a   s p e c i a l   s t r i n g   i t e m   a n n o t a t i o n 
 
 T h e s e   o t h e r   v a l u e s   c a n   a l s o   b e   a c q u i r e d . 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   n a m e   ( r e q u i r e d ) 
 
 T o   s p e c i f y   t h e   f i l e   n a m e   o f   t h e   o b j e c t   ( f o l d e r   p a t h   i s   n o t   i n c l u d e d ) . 
 
 
 
 I f   y o u   s p e c i f y   a   s p e c i a l   f i l e   n a m e   " ( s e l f ) " , 
 
 T h e   o b j e c t   i t s e l f   t h a t   i t s   e f f e c t   i s   a s s i g n e d   I   c a n   b e   t a r g e t e d . 
 
 
 
 A l s o ,   i f   y o u   s p e c i f y   a   s p e c i a l   f i l e   n a m e   " ( O f f s c r e e n O w n e r ) " , 
 
 C a n   b e   a n   o f f - s c r e e n   o f   t h e   o w n e r   o f   t h e   o b j e c t   t o   t h e   t a r g e t   ( i n   t h e   c a s e   o f   d u r i n g   t h e   o f f - s c r e e n   r e n d e r i n g   o n l y ) . 
 
 H e r e ,   t h e   o f f - s c r e e n   o w n e r s ,   t h e   e f f e c t   t h a t   O F F S C R E E N R E N D E R T A R G E T   i s   d e c l a r e d 
 
 I   r e f e r   t o   a l l o c a t e d   o b j e c t s 
 
 
 
    S t r i n g   i t e m   ( o p t i o n a l ) 
 
 S p e c i f y   i f   y o u   w a n t   t o   g e t   t h e   s p e c i a l   v a l u e   o f   t h e   o b j e c t . 
 
 
 
 S p e c i f y   o n e   o f   t h e   f o l l o w i n g . 
 
 B o n e   n a m e s :   I   g e t   t h e   c o o r d i n a t e s   o r   w o r l d   t r a n s f o r m a t i o n   m a t r i x   o f   t h e   s p e c i f i e d   b o n e   o f   P M D   m o d e l . 
 
 T y p e   f l o a t 3 ,   f l o a t 4 ,   o n e   o f   f l o a t 4 x 4 . 
 
 E x p r e s s i o n   n a m e :   I   g e t   t h e   v a l u e   o f   t h e   s p e c i f i e d   e x p r e s s i o n   o f   P M D   m o d e l .   T y p e   f l o a t . 
 
 
 
 " X " :   ( X   a c c e s s o r y   p a n e l )   p o s i t i o n   X   o f   t h e   a c c e s s o r y .   T y p e   f l o a t . 
 
 " Y " :   ( Y   a c c e s s o r y   p a n e l )   p o s i t i o n   Y   o f   a c c e s s o r i e s .   T y p e   f l o a t . 
 
 " Z " :   ( Z   a c c e s s o r y   p a n e l )   p o s i t i o n   Z   o f   a c c e s s o r i e s .   T y p e   f l o a t . 
 
 " X Y Z " :   p o s i t i o n   o f   t h e   a c c e s s o r y   ( a c c e s s o r y   p a n e l   X ,   Y ,   Z ) .   T y p e   f l o a t 3 . 
 
 " R x " :   ( R x   a c c e s s o r y   p a n e l )   r o t a t i o n   X   a c c e s s o r i e s .   T y p e   f l o a t .   ( ;   1 ) 
 
 " R y " :   ( R y   a c c e s s o r y   p a n e l )   r o t a t i o n   Y   a c c e s s o r i e s .   T y p e   f l o a t . 
 
 " R z " :   ( R z   o f   a c c e s s o r y   p a n e l )   r o t a t i o n   Z   a c c e s s o r i e s .   T y p e   f l o a t . 
 
 " R x y z " :   r o t a t i o n   o f   a c c e s s o r i e s   ( a c c e s s o r y   p a n e l   o f   R x ,   R y ,   R z ) .   T y p e   f l o a t 3 . 
 
 " S i " :   t h e   s i z e   o f   t h e   a c c e s s o r y   ( S i   a c c e s s o r i e s   p a n e l ) .   T y p e   f l o a t .   ( ;   2 ) 
 
 " T r " :   t r a n s p a r e n c y   o f   a c c e s s o r i e s   ( S i   a c c e s s o r i e s   p a n e l ) .   T y p e   f l o a t . 
 
 
 
 ;   1   r e s u l t i n g   v a l u e s   a r e   a   r e p r e s e n t a t i o n   o f   t h e   v a l u e   o n   t h e   p a n e l   i n   r a d i a n s . 
 
 ;   2   r e s u l t i n g   v a l u e s   a r e   t h o s e   w h e r e   t h e   v a l u e   o f   t h e   p a n e l   1 0   t i m e s . 
 
 
 
       %  u s e   c a s e s 
 
           G e t   w h e t h e r   / / " s t a g e 0 1 . x   " i s   d i s p l a y e d 
 
           b o o l   f l a g :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " s t a g e 0 1 . x " ; > ; 
 
         
 
           G e t   t h e   s c a l i n g   v a l u e   o f   / / " n e g i . x   " 
 
           f l o a t   s c a l i n g :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " n e g i . x " ; > ; 
 
 
 
           G e t   r o t a t i o n   X   o f   / / " n e g i . x   " 
 
           f l o a t   r o t _ x :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " n e g i . x " ;   s t r i n g   i t e m   =   " R x " ; > ; 
 
 
 
           G e t   r o t a t i o n   X   o f   / / " n e g i . x   " i n   d e g r e e s   U n i t 
 
           f l o a t   r o t _ x _ r a d :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " n e g i . x " ;   s t r i n g   i t e m   =   " R x " ; > ; 
 
           s t a t i c   f l o a t   r o t _ x   =   r o t _ x _ r a d   *   1 8 0   /   3 . 1 4 1 5 9 2 6 5 ; 
 
 
 
           C o o r d i n a t e   a c q u i s i t i o n   o f   b o n e   " P o n i t e   I K "   o f   / /   " H a k u   Y o w a n e   . p m d " 
 
           f l o a t 3   p o s :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " H a k u   Y o w a n e   . p m d " ;   s t r i n g   i t e m   =   " P o n i t e   I K " ; > ; 
 
 
 
           V a l u e   a c q u i s i t i o n   o f   e x p r e s s i o n   " b l i n k "   o f   / /   " H a k u   Y o w a n e   . p m d " 
 
           f l o a t   m o r p h :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " H a k u   Y o w a n e   . p m d " ;   s t r i n g   i t e m   =   " b l i n k " ; > ; 
 
 
 
 %  s u p p l e m e n t 
 
    F o r   w o r l d   t r a n s f o r m a t i o n   m a t r i x   o f   P M D   m o d e l   d o e s   n o t   c h a n g e   i n   t h e   i d e n t i t y   m a t r i x , 
 
 N o r m a l l y ,   i t   i s   u s e d   f o r   X - F i l e s   ( a c c e s s o r y ) . 
 
 S c a l i n g   v a l u e   o f   a c c e s s o r i e s ,   m a d e   t h e   v a l u e   s p e c i f i e d   i n   t h e   S i z e   o f   t h e   a c c e s s o r y   o n   t h e   M M D   t o   1 0   t i m e s   t h e   v a l u e . 
 
 ( I n t e r n a l l y ,   I   h a v e   b e e n   u s i n g   t h e   v a l u e   o b t a i n e d   b y   t h e   l e n g t h   ( w o r l d _ m a t r i x . _ 1 1 _ 1 2 _ 1 3 ) ) 
 
 "   I f   t h e   o b j e c t   o f   t h e   s p e c i f i e d   f i l e   n a m e   d o e s   n o t   e x i s t ,   t h e   f o l l o w i n g   v a l u e s   a r e   s e t . 
 
 I n   t h e   c a s e   o f   X - F i l e s : 
 
 S c a l i n g   v a l u e :   1 0 
 
 O f f s e t   v a l u e :   ( 0 ,   0 ,   0 ,   1 ) 
 
 W o r l d   t r a n s f o r m a t i o n   m a t r i x :   s c a l i n g   m a t r i x   ( x y z   e a c h   1 0 - f o l d ) 
 
 S p e c i a l   i t e m :   0 
 
 I n   t h e   c a s e   o f   P M D   f i l e : 
 
 S c a l i n g   v a l u e :   1 
 
 O f f s e t   v a l u e :   ( 0 ,   0 ,   0 ,   1 ) 
 
 W o r l d   t r a n s f o r m a t i o n   m a t r i x :   i d e n t i t y   m a t r i x 
 
 B o n e   o f   c o o r d i n a t e s :   ( 0 ,   0 ,   0 ,   1 ) 
 
 B o n e   o f   t r a n s f o r m a t i o n   m a t r i x :   i d e n t i t y   m a t r i x 
 
 E x p r e s s i o n   v a l u e s :   0 
 
 
 
 - T h a n   M M E   v e r 0 . 2 0 ,   e v e n   i f   t h e   r e f e r e n c e d   o b j e c t   h a s   n o t   b e e n   d r a w n   i n   t h e   l a t e r   t h a n   t h e   r e f e r e n c e   t h e   o r i g i n a l   o b j e c t , 
 
 I   c a m e   t o   t h e   v a l u e   c a n   b e   o b t a i n e d . 
 
 
 
 "   I f   a n   o b j e c t   w i t h   t h e   s p e c i f i e d   n a m e   t h e r e   i s   m o r e   t h a n   o n e ,   i t   i s   s e l e c t e d   i n   t h e   f o l l o w i n g   o r d e r   o f   p r i o r i t y . 
 
 ( 1 )   S e e   t h e   o r i g i n a l   i n   t h e   d r a w i n g   o r d e r   i s   e a r l i e r   t h a n   t h e   o b j e c t ,   a n d   m o s t   d r a w i n g   o r d e r   i s   c l o s e . 
 
 ( 2 )   t h o s e   d r a w i n g   o r d e r   i s   t h e   l a s t 
 
 
 
 -   S u c h   a s   t h e   d u m m y   b o n e   . p m d ,   f o r   o b j e c t s   t h a t   d o   n o t   h a v e   e v e n   o n e   v e r t e x , 
 
 I   c a n   n o t   g e t   t h e   c o o r d i n a t e s   t o   b e   s p e c i f i e d   i n   t h e   r e f e r e n c e d . 
 
 
 
 
 
 2 . 7   t e x t u r e   r e l a t e d 
 
 
 
 %  N o r m a l   t e x t u r e 
 
 
 
 I   g e n e r a t e   t e x t u r e . 
 
 
 
 T y p e   t e x t u r e ,   t e x t u r e 2 D ,   t e x t u r e 3 D ,   o n e   o f   t e x t u r e C U B E . 
 
 R E N D E R C O L O R T A R G E T ,   R E N D E R D E P T H S T E N C I L T A R G E T ,   s e m a n t i c s   o t h e r   t h a n   A N I M A T E D T E X T U R E   i s   i g n o r e d   i f   s p e c i f i e d . 
 
 
 
 T h e   c o n t e n t s   o f   t h e   g e n e r a t e d   t e x t u r e ,   u p o n   s e t t i n g   t h e   s a m p l e r ,   c a n   r e f e r   b y   c a l l i n g   l i k e   t e x 2 D   ( s ,   t )   f u n c t i o n . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   R e s o u r c e T y p e 
 
 I   w i l l   s p e c i f y   t h e   t y p e   o f   t e x t u r e .   " 2 D " ,   " 3 D " ,   t o   s p e c i f y   o n e   o f   t h e   " C U B E " . 
 
 T y p e   a s   i n c o n s i s t e n t   v a l u e   c a n   n o t   b e   s p e c i f i e d . 
 
 
 
 T h e   t y p e   i s   a   " t e x t u r e " ,   a n d   i n   t h e   c a s e   o f   g e n e r a t i n g   t h e   t e x t u r e   o t h e r   t h a n   c u t l e t   " 2 D "   i s 
 
 A l w a y s   y o u   m u s t   s p e c i f y   t h i s   a n n o t a t i o n .   O t h e r w i s e   i t   c a n   b e   o m i t t e d . 
 
 
 
    S t r i n g   R e s o u r c e N a m e 
 
 I   s p e c i f y   t h e   i m a g e   f i l e   t h a t   i s   i n   t h e   t e x t u r e   o f   t h e   o r i g i n a l . 
 
 S u p p o r t e d   f i l e   f o r m a t s ,   b m p ,   . d d s ,   . d i b ,   . j p g ,   . p n g ,   a n d   a   . t g a . 
 
 I f   y o u   s p e c i f y   a   f i l e   n a m e   w i t h   a   r e l a t i v e   p a t h ,   t h e   f o l d e r   w h e r e   t h e   e f f e c t   f i l e   i s   s t o r e d   i s   t h e   r e f e r e n c e . 
 
 
 
    I n t   W i d t h 
 
    I n t   H e i g h t 
 
    I n t   D e p t h 
 
 T e x t u r e   o f   w i d t h ,   I   s p e c i f i e s   t h e   h e i g h t ,   t h e   d e p t h ,   i n   p i x e l s . 
 
 T o   s p e c i f y   t h e   d e p t h   i s   o n l y   w h e n   t h e   v o l u m e   t e x t u r e s . 
 
 
 
 D i m e n s i o n s ,   c a n   n o t   b e   s p e c i f i e d   a t   t h e   s a m e   t i m e   a n d   V i e w p o r t R a t i o . 
 
 
 
 ( W i d t h ,   H e i g h t ,   D e p t h ) ,   D i m e n s i o n s ,   w h e n   n o n e   o f   V i e w p o r t R a t i o   n o t   s p e c i f i e d , 
 
 T h e   d e f a u l t   v a l u e   i s   6 4   p i x e l s . 
 
 I n   a d d i t i o n ,   i f   R e s o u r c e N a m e   i s   s p e c i f i e d ,   t h e   s i z e   f r o m   t h e   i m a g e   f i l e   i s   a u t o m a t i c a l l y   r e t r i e v e d . 
 
 
 
    I n t 2   ( o r   i n t 3 )   D i m e n s i o n s 
 
 T e x t u r e   o f   w i d t h ,   I   s p e c i f i e s   t h e   h e i g h t ,   t h e   d e p t h ,   i n   p i x e l s . 
 
 T o   s p e c i f y   t h e   d e p t h   i s   o n l y   w h e n   t h e   v o l u m e   t e x t u r e s . 
 
 
 
 V i e w p o r t R a t i o ,   W i d t h ,   H e i g h t ,   c a n   n o t   b e   s p e c i f i e d   a t   t h e   s a m e   t i m e   a n d   D e p t h . 
 
 
 
    F l o a t 2   V i e w p o r t R a t i o 
 
 T e x t u r e   o f   w i d t h ,   t h e   h e i g h t ,   I   s p e c i f y   t h e   r a t i o   o f   t h e   s c r e e n   s i z e   o f   t h e   r e n d e r   t a r g e t . 
 
 T o   g e n e r a t e   t h e   t e x t u r e   o f   t h e   s a m e   s i z e   a s   t h e   s c r e e n ,   " f l o a t 2   V i e w p o r t R a t i o   =   { 1 . 0 ,   1 . 0 } ; "   a n d   i s   s p e c i f i e d . 
 
 T o   g e n e r a t e   t h e   t e x t u r e   o f   t h e   s c r e e n   v e r t i c a l l y   a n d   h o r i z o n t a l l y   t w i c e   t h e   s i z e   o f ,   " f l o a t 2   V i e w p o r t R a t i o   =   { 2 . 0 ,   2 . 0 } ; "   a n d   i s   s p e c i f i e d . 
 
             
 
 D i m e n s i o n s ,   W i d t h ,   H e i g h t ,   c a n   n o t   b e   s p e c i f i e d   a t   t h e   s a m e   t i m e   a n d   D e p t h . 
 
 
 
    S t r i n g   F o r m a t 
 
 I   s p e c i f y   t h e   f o r m a t   o f   t h e   t e x t u r e . 
 
 
 
 I f   i t   i s   o m i t t e d ,   " A 8 R 8 G 8 B 8 "   i s   u s e d . 
 
 R e s o u r c e N a m e   i f   i s   s p e c i f i e d ,   t h e   f o r m a t   i s   o b t a i n e d   f r o m   t h e   i m a g e   f i l e , 
 
 T h e   s e t t i n g   o f   t h i s   a n n o t a t i o n   i s   i g n o r e d . 
 
 
 
 P o s s i b l e   f o r m a t s ,   D 3 D F O R M A T   ( h t t p : / / m s d n . m i c r o s o f t . c o m / j a - j p / l i b r a r y / b b 1 7 2 5 5 8   ( v   =   V S . 8 5 )   . a s p x ) 
 
 S e e . 
 
 
 
 " A 8 R 8 G 8 B 8 " ,   " F M T _ A 8 R 8 G 8 B 8 " ,   I   c a n   b e   s p e c i f i e d   i n   a n y   o f   t h e   f o r m a t   o f   " D 3 D F M T _ A 8 R 8 G 8 B 8 " . 
 
 
 
    I n t   M i p l e v e l s 
 
 I   g e n e r a t e   a   m i p m a p   a t   t h e   s p e c i f i e d   l e v e l . 
 
 I f   y o u   s p e c i f y   0   o r   o m i t t e d ,   c o m p l e t e   m i p m a p   c h a i n   i s   c r e a t e d . 
 
 I f   y o u   s p e c i f y   1 ,   m i p m a p   i s   n o t   g e n e r a t e d . 
 
             
 
    I n t   L e v e l s 
 
 I t   i s   a n   a l i a s   o f   M i p l e v e l s . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           t e x t u r e   n e g i _ t e x   < s t r i n g   R e s o u r c e N a m e   =   " n e g i . b m p " ; > ; 
 
           s a m p l e r   T e x S a m p l e r   =   s a m p l e r _ s t a t e   { 
 
                   t e x t u r e   =   < n e g i _ t e x > ; 
 
           } ; 
 
         
 
           t e x t u r e 2 D   m a p _ t e x   < 
 
                   s t r i n g   R e s o u r c e N a m e   =   " m a p . p n g " ; 
 
                   i n t   M i p l e v e l s   =   1 ; 
 
                   i n t   W i d t h   =   6 4 ; 
 
                   i n t   H e i g h t   =   6 4 ; 
 
           > ; 
 
 
 
 
 
 %  R E N D E R C O L O R T A R G E T 
 
 
 
 I   g e n e r a t e d   t h a t   c a n   b e   s p e c i f i e d   s u r f a c e   t o   r e n d e r   t a r g e t . 
 
 T e x t u r e   t h a t   w a s   g e n e r a t e d   b y   s p e c i f y i n g   t h e   s e m a n t i c s ,   t h e   s c r i p t   o f   R e n d e r C o l o r T a r g e t 
 
 C a n   b e   s p e c i f i e d . 
 
 A f t e r   r e n d e r i n g ,   a s   w e l l   a s   t h e   n o r m a l   t e x t u r e ,   I   c a n   s e e   t h e   c o n t e n t s   i n   t e x 2 D   ( )   f u n c t i o n . 
 
 
 
 T y p e   t e x t u r e ,   o n e   o f   t e x t u r e 2 D . 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    I n t   W i d t h ,   i n t   H e i g h t ,   i n t   D e p t h 
 
    I n t 2   D i m e n s i o n s 
 
    F l o a t 2   V i e w p o r t R a t i o 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " f l o a t 2   V i e w p o r t R a t i o   =   { 1 . 0 ,   1 . 0 } ; "   s e t t i n g   t h a t   i s   u s e d . 
 
 
 
    S t r i n g   F o r m a t 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " A 8 R 8 G 8 B 8 "   i s   u s e d . 
 
 
 
    I n t   M i p l e v e l s 
 
    I n t   L e v e l s 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 1   o r   0   i s   I   c a n   b e   s p e c i f i e d . 
 
 I f   y o u   s p e c i f y   0 ,   c o m p l e t e   m i p m a p   c h a i n   i s   c r e a t e d . 
 
 I f   y o u   s p e c i f y   1 ,   m i p m a p   i s   n o t   g e n e r a t e d   ( d e f a u l t ) . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           t e x t u r e 2 D   S c n M a p :   R E N D E R C O L O R T A R G E T   < 
 
                   f l o a t 2   V i e w P o r t R a t i o   =   { 1 . 0 , 1 . 0 } ; 
 
                   i n t   M i p L e v e l s   =   1 ; 
 
                   s t r i n g   F o r m a t   =   " A 8 R 8 G 8 B 8 " ; 
 
           > ; 
 
           s a m p l e r 2 D   S c n S a m p   =   s a m p l e r _ s t a t e   { 
 
                   t e x t u r e   =   < S c n M a p > ; 
 
           } ; 
 
 
 
           t e c h n i q u e   T e c h   < 
 
                   s t r i n g   S c r i p t   =   " R e n d e r C o l o r T a r g e t 0   =   S c n M a p ; 
 
                   . . . 
 
 
 
 
 
 %  R E N D E R D E P T H S T E N C I L T A R G E T 
 
 
 
 I   g e n e r a t e   a   d e p t h   s t e n c i l   s u r f a c e   ( s o - c a l l e d   Z - b u f f e r ) . 
 
 T e x t u r e   t h a t   w a s   g e n e r a t e d   b y   s p e c i f y i n g   t h e   s e m a n t i c s ,   t h e   s c r i p t   o f   R e n d e r D e p t h S t e n c i l T a r g e t 
 
 C a n   b e   s p e c i f i e d . 
 
 
 
 U n l i k e   t e x t u r e   t h a t   g e n e r a t e d   b y   R E N D E R C O L O R T A R G E T ,   t e x t u r e   p r o d u c e d   b y   t h i s   s e m a n t i c s , 
 
 A f t e r   r e n d e r i n g   a l s o ,   i t   i s   n o t   p o s s i b l e   t o   v i e w   t h e   c o n t e n t s . 
 
 
 
 T y p e   t e x t u r e ,   o n e   o f   t e x t u r e 2 D . 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    I n t   W i d t h ,   i n t   H e i g h t ,   i n t   D e p t h 
 
    I n t 2   ( o r   i n t 3 )   D i m e n s i o n s 
 
    F l o a t 2   V i e w p o r t R a t i o 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " f l o a t 2   V i e w p o r t R a t i o   =   { 1 . 0 ,   1 . 0 } ; "   s e t t i n g   t h a t   i s   u s e d . 
 
 
 
    S t r i n g   F o r m a t 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " D 2 4 S 8 "   i s   u s e d . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           t e x t u r e 2 D   D e p t h B u f f e r :   R E N D E R D E P T H S T E N C I L T A R G E T   < 
 
                   f l o a t 2   V i e w P o r t R a t i o   =   { 2 . 0 , 2 . 0 } ; 
 
                   s t r i n g   F o r m a t   =   " D 2 4 S 8 " ; 
 
           > ; 
 
 
 
           t e c h n i q u e   T e c h   < 
 
                   s t r i n g   S c r i p t   =   " R e n d e r D e p t h S t e n c i l T a r g e t   =   D e p t h B u f f e r ; 
 
                   . . . 
 
 
 
 
 
 %  A N I M A T E D T E X T U R E 
 
 
 
 I   t o   g e n e r a t e   t h e   a n i m a t i o n   t e x t u r e . 
 
 
 
 T y p e   t e x t u r e ,   o n e   o f   t e x t u r e 2 D . 
 
 
 
 B y   d e f a u l t ,   i n   a d d i t i o n   t o   a u t o m a t i c a l l y   a n i m a t e   i n   c o n j u n c t i o n   w i t h   t h e   f r a m e   t i m e , 
 
 S u c h   a s   a   c o n t r o l   o b j e c t   c a n   a l s o   b e   a n i m a t e d   i n   c o n j u n c t i o n   w i t h   a n o t h e r   p a r a m e t e r . 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    S t r i n g   R e s o u r c e N a m e   ( r e q u i r e d ) 
 
 M a d e   t o   t h e   t e x t u r e   o f   t h e   o r i g i n a l ,   I   s p e c i f y   t h e   a n i m a t i o n   i m a g e   f i l e s . 
 
 S u p p o r t e d   f i l e   f o r m a t s   a r e   . g i f   ( a n i m a t e d   G I F )   a n d   . p n g   ( A P N G ) . 
 
 
 
    F l o a t   O f f s e t   ( O p t i o n a l ) 
 
 I   s t a g g e r   t h e   s t a r t   t i m e   o f   t h e   a n i m a t i o n .   ( I n   s e c o n d s ) 
 
 F o r   e x a m p l e ,   s p e c i f y i n g   a   2 . 5 ,   i t   i s   p o s s i b l e   t o   d e l a y   t h e   a n i m a t i o n   s t a r t   2 . 5   s e c o n d s . 
 
 T h e   d e f a u l t   v a l u e   i s   0 . 0 . 
 
 
 
    F l o a t   S p e e d   ( o p t i o n a l ) 
 
 I   s p e c i f y   t h e   p l a y b a c k   s p e e d   o f   a n i m a t i o n . 
 
 F o r   e x a m p l e ,   i f   y o u   s p e c i f y   t h e   2 . 0 ,   t h e   s p e e d   o f   t h e   a n i m a t i o n   i s   d o u b l e d . 
 
 T h e   d e f a u l t   v a l u e   i s   1 . 0 . 
 
 
 
    S t r i n g   S e e k V a r i a b l e   ( o p t i o n a l ) 
 
 T h e   s e e k   c o n t r o l   o f   t h e   a n i m a t i o n ,   i t   i s   s p e c i f i e d   w h e n   p e r f o r m i n g   a   m e t h o d   o t h e r   t h a n   t h e   f r a m e   t i m e . 
 
 I f   y o u   s p e c i f y   t h e   n a m e   o f   t h e   p a r a m e t e r ,   i n   c o n j u n c t i o n   w i t h   t h e   c h a n g e   i n   t h e   v a l u e   o f   t h e   p a r a m e t e r ,   a n i m a t i o n   i s   p e r f o r m e d . 
 
 
 
 B y   d e f a u l t ,   i t   i s   a n i m a t i o n   i n   c o n j u n c t i o n   w i t h   t h e   f r a m e   t i m e   ( T I M E   < S y n c I n E d i t M o d e   =   t r u e > ) . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           T o   a n i m a t e   i n   c o n j u n c t i o n   w i t h   t h e   c h a n g e s   i n   t h e   S i z e   o f   t h e   / /   o b j e c t   s e e k . x 
 
         
 
           f l o a t   a t i m e :   C o n t r o l O b j e c t   < s t r i n g   N a m e   =   " s e e k . x " ; > ; 
 
         
 
           t e x t u r e   A n i m e T e x :   A N I M A T E D T E X T U R E   < 
 
                   s t r i n g   R e s o u r c e N a m e   =   " a n i m e . p n g " ; 
 
                   s t r i n g   S e e k V a r i a b l e   =   " a t i m e " ; 
 
           > ; 
 
 
 
 %  s u p p l e m e n t 
 
 "   I f   t h e   a n i m a t i o n   i s   t h e   f p s   t o   r e q u e s t ,   w a s   l o w e r   t h a n   t h e   f p s   o f   M M D   o f   d r a w i n g ,   d r o p p e d   f r a m e s   o c c u r . 
 
 F o r   A P N G    ,   h u g e   a n i m a t i o n   f i l e s   o f   G B y t e   u n i t   a l s o   ( o n c e )   c a n   b e   p l a y e d . 
 
 
 
 
 
 %  O F F S C R E E N R E N D E R T A R G E T 
 
 
 
 O f f - s c r e e n   r e n d e r   t a r g e t   t o   g e n e r a t e . 
 
 
 
 T y p e   t e x t u r e ,   o n e   o f   t e x t u r e 2 D . 
 
 
 
 W h e n   y o u   g e n e r a t e   a n   o f f - s c r e e n   r e n d e r   t a r g e t , 
 
 A u t o m a t i c a l l y ,   d r a w i n g   o f   a l l   o b j e c t s   i n   t h e   s p e c i f i e d   c o n d i t i o n s ,   c o m e   t o   b e   p e r f o r m e d   o n   t h e   r e n d e r   t a r g e t . 
 
 
 
 R e n d e r i n g   r e s u l t s ,   a s   w e l l   a s   t h e   n o r m a l   t e x t u r e   I   c a n   b e   r e f e r e n c e d   i n   t e x 2 D   ( )   f u n c t i o n . 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    I n t   W i d t h ,   i n t   H e i g h t ,   i n t   D e p t h 
 
    I n t 2   D i m e n s i o n s 
 
    F l o a t 2   V i e w p o r t R a t i o 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " f l o a t 2   V i e w p o r t R a t i o   =   { 1 . 0 ,   1 . 0 } ; "   s e t t i n g   t h a t   i s   u s e d . 
 
 
 
    S t r i n g   F o r m a t 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 I f   i t   i s   o m i t t e d ,   " A 8 R 8 G 8 B 8 "   i s   u s e d . 
 
 
 
    I n t   M i p l e v e l s 
 
    I n t   L e v e l s 
 
 S e e   " %  N o r m a l   t e x t u r e " . 
 
 1   o r   0   i s   I   c a n   b e   s p e c i f i e d . 
 
 I f   y o u   s p e c i f y   0 ,   c o m p l e t e   m i p m a p   c h a i n   i s   c r e a t e d . 
 
 I f   y o u   s p e c i f y   1 ,   m i p m a p   i s   n o t   g e n e r a t e d   ( d e f a u l t ) . 
 
 
 
    F l o a t 4   C l e a r C o l o r 
 
 I   s e t   t h e   c o l o r   t o   c l e a r   t h e   r e n d e r   t a r g e t . 
 
 W i t h   t h e   c o l o r   s p e c i f i e d   h e r e ,   r e n d e r i n g   t h e   t a r g e t   i s   a u t o m a t i c a l l y   c l e a r e d . 
 
 
 
    F l o a t   C l e a r D e p t h 
 
 I   s e t   t h e   Z   v a l u e   t o   c l e a r   t h e   d e p t h   s t e n c i l   s u r f a c e . 
 
 I n   Z   v a l u e   s p e c i f i e d   h e r e ,   d e p t h   s t e n c i l   s u r f a c e   i s   a u t o m a t i c a l l y   c l e a r e d . 
 
 
 
    B o o l   A n t i A l i a s 
 
 I   u s e   a n t i - a l i a s i n g   t o   r e n d e r i n g .   T h e   d e f a u l t   i s   f a l s e . 
 
 ;   I f   a n t i - a l i a s i n g   i s   e n a b l e d ,   f o r   t h e   v i d e o   m e m o r y   i s   o f t e n   c o n s u m e d , 
 
 T h i n g   t o   n o t e   i s   t h e   s i z e   o f   t h e   t e x t u r e 
 
 
 
    S t r i n g   D e s c r i p t i o n 
 
 I   s p e c i f y   a   d e s c r i p t i o n   o f   o f f - s c r e e n   r e n d e r   t a r g e t . 
 
 S t r i n g   t h a t   y o u   s p e c i f y   h e r e   i s   d i s p l a y e d   o n   t h e   G U I   d i a l o g   e f f e c t s   a s s i g n m e n t . 
 
 
 
    S t r i n g   D e f a u l t E f f e c t 
 
 T o   s p e c i f y   t h e   a l l o c a t i o n   m e t h o d   o f   t h e   e f f e c t   f i l e   t o   b e   u s e d   i n   t h e   o f f - s c r e e n   r e n d e r i n g . 
 
 O n e   a s s i g n m e n t   d e s c r i b e s   i n   t h e   f o l l o w i n g   f o r m a t . 
 
 
 
 " ( O b j e c t   f i l e   n a m e )   =   ( E f f e c t   f i l e   n a m e ) ; " 
 
 
 
 T o   s w i t c h   t h e   e f f e c t   f i l e   t o   b e   u s e d   f o r   e a c h   o b j e c t ,   a n d   d e s c r i b e s   s e v e r a l   t i m e s   t h i s   a s s i g n m e n t . 
 
 I f   m u l t i p l e   t i m e s   d e s c r i b e d   a r e   c o m p a r e d   o b j e c t   f i l e   n a m e   i n   t h e   o r d e r   d e s c r i b e d ,   t h a t   t h e   f i r s t   m a t c h   i s   e m p l o y e d . 
 
 
 
 E x a m p l e :   s t r i n g   D e f a u l t E f f e c t   =   " s e l f   =   h i d e ;   M i r r o r   *   . x   =   h i d e ;   *   =   M i r r o r O b j e c t . f x ; " ; 
 
 
 
 T h e   o b j e c t   f i l e   n a m e   " * "   a n d   " ? "   W i l d c a r d   i s   I   c a n   b e   s p e c i f i e d   b y . 
 
 A s   a   s p e c i a l   o b j e c t   f i l e   n a m e   " s e l f "   c a n   b e   s p e c i f i e d ,   t h i s   i s , 
 
 I   r e p r e s e n t   t h e   o b j e c t   i t s e l f   t h e   e f f e c t   i s   a s s i g n e d   w i t h   t h i s   O F F S C R E E N R E N D E R T A R G E T . 
 
 
 
 I f   y o u   s p e c i f y   a   f i l e   n a m e   w i t h   a   r e l a t i v e   p a t h   t o   t h e   e f f e c t   f i l e   n a m e , 
 
 F o l d e r   i n   w h i c h   t h e   r e f e r e n c e   s o u r c e   o f   t h e   e f f e c t   f i l e   i s   s t o r e d   i s   t h e   r e f e r e n c e . 
 
 
 
 I n   a d d i t i o n ,   a s   a   s p e c i a l   e f f e c t   f i l e   n a m e   " n o n e "   a n d   " h i d e "   c a n   b e   s p e c i f i e d , 
 
 T h i s   r e p r e s e n t s   a   " n o   e f f e c t "   " h i d d e n " . 
 
 A l s o ,   i f   y o u   s p e c i f y   t h e   " m a i n _ d e f a u l t " ,   i s   t h e   s a m e   a s   t h e   d e f a u l t   b e h a v i o r   o f   t h e   m a i n   s c r e e n , 
 
 A u t o m a t i c   a s s i g n m e n t   o f   f x   f i l e s   a n d   e m d   f i l e   b a s e d   o n   t h e   o b j e c t   f i l e   p a t h   i s   p e r f o r m e d . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           t e x t u r e   M i r r o r R T :   O F F S C R E E N R E N D E R T A R G E T   < 
 
                   s t r i n g   D e s c r i p t i o n   =   " O f f S c r e e n   R e n d e r T a r g e t   f o r   M i r r o r . f x " ; 
 
                   i n t   W i d t h   =   2 5 6 ; 
 
                   i n t   H e i g h t   =   2 5 6 ; 
 
                   f l o a t 4   C l e a r C o l o r   =   { 1 ,   1 ,   1 ,   1 } ; 
 
                   f l o a t   C l e a r D e p t h   =   1 . 0 ; 
 
                   b o o l   A n t i A l i a s   =   t r u e ; 
 
                   s t r i n g   D e f a u l t E f f e c t   = 
 
                           " s e l f   =   h i d e ; " 
 
                           " M i r r o r   *   . x   =   h i d e ; " 
 
                           " *   =   M i r r o r O b j e c t . f x ; " ; 
 
           > ; 
 
 
 
 %  T E X T U R E V A L U E 
 
 
 
 O f   t h e   s p e c i f i e d   t e x t u r e ,   t o   b e   s t o r e d   i n   t h e   a r r a y   t o   g e t   t h e   t e x e l   i n f o r m a t i o n . 
 
 I f   y o u   u s e   t h i s ,   e v e n   i n   a n   e n v i r o n m e n t   t h a t   d o e s   n o t   c o r r e s p o n d   t o   t h e   V T F   ( V e r t e x   T e x t u r e   F e t c h i n g ) , 
 
 Y o u   c a n   s e e   f r o m   t h e   v e r t e x   s h a d e r   t e x t u r e   v a l u e   ( ;   T h e r e   l i m i t .   S e e   S u p p l e m e n t ) 
 
 
 
 T y p e   t w o - d i m e n s i o n a l   a r r a y   o f   f l o a t 4   ( [ h e i g h t ]   [ w i d t h ] ) ,   o r   a   o n e - d i m e n s i o n a l   a r r a y . 
 
 
 
 %  a n n o t a t i o n 
 
    S t r i n g   T e x t u r e N a m e   ( r e q u i r e d ) 
 
 I   s p e c i f y   t h e   p a r a m e t e r   n a m e   o f   t h e   t e x t u r e . 
 
 
 
       %  u s e   c a s e s 
 
           f l o a t 4   P a r t i c l e B a s e A r r a y   [ T E X _ H E I G H T ]   [ T E X _ W I D T H ] :   T E X T U R E V A L U E   < 
 
                   s t r i n g   T e x t u r e N a m e   =   " P a r t i c l e B a s e T e x " ; 
 
           > ; 
 
           f l o a t 4   P a r t i c l e B a s e A r r a y 2   [ T E X _ H E I G H T ] :   T E X T U R E V A L U E   < 
 
                   s t r i n g   T e x t u r e N a m e   =   " P a r t i c l e B a s e T e x 2 " ; 
 
           > ; 
 
 
 
           f l o a t 4   c o l o r 1   =   P a r t i c l e B a s e A r r a y   [ v ]   [ u ] ; 
 
           f l o a t 3   c o l o r 2   =   P a r t i c l e B a s e A r r a y 2   [ i d x ]   . r g b ; 
 
       
 
 %  s u p p l e m e n t 
 
 "   I n   o r d e r   t o   p a s s   t h e   v a l u e   i n   t h e   c o n s t a n t   r e g i s t e r ,   t e x e l   n u m b e r   y o u   c a n   s e e   t h e   l i m i t   i s   a b o u t   2 0 0 . 
 
 -   I f   t h e   s i z e   o f   t h e   a r r a y   d o e s   n o t   m a t c h   t h e   s i z e   o f   t h e   t e x t u r e ,   t h e r e   i s   n o   g u a r a n t e e   t h a t   t h e   c o r r e c t   v a l u e   c a n   b e   o b t a i n e d . 
 
 I n   s o m e   e n v i r o n m e n t s ,   o n l y   i t   i s   n o t   p o s s i b l e   t o   c r e a t e   a   p o w e r   o f   2   s i z e s   o f   t h e   t e x t u r e , 
 
 N o t e   a l s o   s p e c i f y   t h e   s i z e   o f   t h e   o t h e r ,   s o   a u t o m a t i c a l l y   h a v e   t h e   s i z e   i s   c r e a t e d   i s   e x p a n d e d . 
 
 A n d   a c q u i s i t i o n   o f   v a l u e s   f r o m   t h e   t e x t u r e ,   i s   d o n e   a t   t h e   s t a r t   o f   t h e   f r a m e . 
 
 T h e r e f o r e ,   u p d a t i n g   t h e   t e x t u r e   o f   t h e   o b j e c t   i n   t h e   m i d d l e ,   a n d   t h e   v a l u e   i s   n o t   u p d a t e d   u n t i l   t h e   n e x t   f r a m e . 
 
 
 
 2 . 8   E f f e c t s   f i l e 
 
 
 
 %  S T A N D A R D S G L O B A L 
 
 
 
 I   s p e c i f y   t h e   v e r s i o n   o f   S A S   ( S t a n d a r d   A n n o t a t i o n s   a n d   S e m a n t i c s ) . 
 
 I n   a d d i t i o n ,   i t   i s   a l s o   u s e d   t o   d e s c r i b e   t h e   a n n o t a t i o n   f o r   t h e   e n t i r e   e f f e c t   f i l e . 
 
 
 
 T h e   p a r a m e t e r   n a m e   " S c r i p t " ,   t y p e   t h a t   y o u   s p e c i f y   t h e   0 . 8   v e r s i o n   n u m b e r   f l o a t ,   a s   t h e   v a l u e . 
 
 
 
 
 
 %  a n n o t a t i o n 
 
 
 
    S t r i n g   S c r i p t O u t p u t   ( o p t i o n a l ) 
 
 " c o l o r "   t h a n   t h e   v a l u e   c a n   n o t   b e   s p e c i f i e d .   T h e   d e f a u l t   v a l u e   i s   a l s o   t h i s   v a l u e . 
 
 
 
    S t r i n g   S c r i p t C l a s s   ( o p t i o n a l ) 
 
 I   s p e c i f y   t h e   p u r p o s e   ( w h a t   e f f e c t   t h a t   d r a w i n g )   o f   t h e   e f f e c t   f i l e . 
 
 
 
 S p e c i f y   o n e   o f   t h e   f o l l o w i n g . 
 
 
 
 " o b j e c t " :   I   d r a w   t h e   o b j e c t .   ( D e f a u l t ) 
 
 " s c e n e " :   I   d r a w   t h e   s c r e e n   b u f f e r . 
 
 " s c e n e o r o b j e c t " :   b o t h   o f   t h e   a b o v e . 
 
 
 
 B a s i c a l l y ,   i n   t h e   n o r m a l   e f f e c t s   o f   o b j e c t s   f o r   d r a w i n g ,   s p e c i f y   t h e   " o b j e c t " , 
 
 P r e - e f f e c t s ,   i n   t h e   p o s t - e f f e c t s ,   I   s p e c i f y   t h e   " s c e n e " . 
 
 
 
 I f   y o u   s p e c i f y   t h e   " o b j e c t " ,   i s   n o t   t o   b e   r u n n i n g   D r a w   =   B u f f e r   i n   t h e   p a t h   o f   t h e   s c r i p t . 
 
 A l s o ,   i f   y o u   s p e c i f y   a   " s c e n e " ,   i s   n o t   t o   b e   r u n n i n g   D r a w   =   G e o m e t r y . 
 
 I f   y o u   s p e c i f y   t h e   " s c e n e o r o b j e c t " ,   y o u   c a n   r u n   b o t h . 
 
 
 
    S t r i n g   S c r i p t O r d e r   ( o p t i o n a l ) 
 
 I   s p e c i f y   t h e   e x e c u t i o n   t i m i n g   o f   t h e   e f f e c t   f i l e . 
 
 
 
 S p e c i f y   o n e   o f   t h e   f o l l o w i n g . 
 
 
 
 " s t a n d a r d " :   I   d r a w   t h e   o b j e c t .   ( D e f a u l t ) 
 
 " p r e p r o c e s s " :   t o   d r a w   b e f o r e   t h e   d r a w i n g   o f   t h e   o b j e c t .   F o r   p r e - e f f e c t s . 
 
 " p o s t p r o c e s s " :   I   d r a w   a f t e r   t h e   d r a w i n g   o f   t h e   o b j e c t .   F o r   p o s t   e f f e c t s . 
 
 
 
 T o   b e   e x a c t   ; ,   t o   f u r t h e r   b e f o r e   t h e   p r e p r o c e s s ,   f r o m   t h e   b e g i n n i n g   o f   t h e   s c r i p t   o f   t h e   p r e - p r o c e s s i n g   ( t e c h n i q u e   o f   p o s t p r o c e s s 
 
 " S c r i p t E x t e r n a l   =   u n t i l   C o l o r )   i s   e x e c u t e d . 
 
 
 
    S t r i n g   S c r i p t   ( o p t i o n a l ) 
 
 T o   s p e c i f y   t h e   s e a r c h   o r d e r   o f   t h e   t e c h n i q u e s   t o   b e   u s e d . 
 
 T y p i c a l l y ,   i n   t h e   o r d e r   l i s t e d   i n   t h e   e f f e c t   f i l e   a v a i l a b l e   t e c h n i q u e   i s   r e t r i e v e d   ( 1 . 2 )   i s 
 
 W i t h   t h i s   a n n o t a t i o n   c a n   b e   e x p l i c i t l y   s p e c i f y   t h e   s e a r c h   o r d e r . 
 
 
 
 I   s p e c i f i e d   i n   t h e   f o l l o w i n g   f o r m a t . 
 
 " ?   T e c h n i q u e   =   T e c h n i q u e   T e c h n i q u e   N a m e   1 :   T e c h n i q u e s   n a m e   2 :   ~ ; " 
 
 
 
 E x a m p l e :   s t r i n g   S c r i p t   =   " ?   T e c h n i q u e   =   T e c h n i q u e   S i m p l e P S :   T e x t u r e d P S :   S i m p l e Q u a d r a t i c P S :   T e x t u r e d Q u a d r a t i c P S ; " ; 
 
 
 
 I n   a d d i t i o n ,   i f   t e c h n i q u e s   t o   b e   u s e d   i s   t h e   o n e ,   c a n   a l s o   b e   s p e c i f i e d   a s   f o l l o w s . 
 
 s t r i n g   S c r i p t   =   " T e c h n i q u e   =   M a i n T e c h ; " ; 
 
 
 
 
 
       %  u s e   c a s e s 
 
         
 
 / /   I f   t h e   n o r m a l   e f f e c t 
 
           f l o a t   S c r i p t :   S T A N D A R D S G L O B A L   < 
 
                   s t r i n g   S c r i p t O u t p u t   =   " c o l o r " ; 
 
                   s t r i n g   S c r i p t C l a s s   =   " o b j e c t " ; 
 
                   s t r i n g   S c r i p t O r d e r   =   " s t a n d a r d " ; 
 
           >   =   0 . 8 ; 
 
 
 
 / /   I n   t h e   c a s e   o f   p o s t - e f f e c t s 
 
           f l o a t   S c r i p t :   S T A N D A R D S G L O B A L   < 
 
                   s t r i n g   S c r i p t O u t p u t   =   " c o l o r " ; 
 
                   s t r i n g   S c r i p t C l a s s   =   " s c e n e " ; 
 
                   s t r i n g   S c r i p t O r d e r   =   " p o s t p r o c e s s " ; 
 
           >   =   0 . 8 ; 
 
 
 
 
 
 2 . 9   s p e c i a l   p a r a m e t e r 
 
 
 
 P a r a m e t e r s   f o l l o w i n g   n a m e s   a u t o m a t i c a l l y   v a l u e   w i t h o u t   s e m a n t i c s   a r e   s e t . 
 
 
 
 %  p a r t h f   ( b o o l   t y p e ) 
 
 S e l f - s h a d o w i n g   f l a g . 
 
 C o r r e s p o n d i n g   t o   t h e   s e l f - s h a d o w i n g   o f   m o d e 1   /   m o d e 2   ( m o d e 1   i n   f a l s e ) . 
 
 
 
 %  s p a d d   ( b o o l   t y p e ) 
 
 S p h e r e   m a p   a d d i t i v e   s y n t h e s i s   f l a g   ( a d d i t i v e   s y n t h e s i s   i n   t r u e ) . 
 
 
 
 %  t r a n s p   ( b o o l   t y p e ) 
 
 S e m i - t r a n s p a r e n t   f l a g   ( s e m i - t r a n s p a r e n t   i n   t r u e ) . 
 
 [ D i s p l a y   ( V ) ]   -   c o r r e s p o n d i n g   t o   t h e   s e m i - t r a n s p a r e n t . 
 
 
 
 %  u s e _ t e x t u r e   ( b o o l   t y p e ) 
 
 T e x t u r e   u s e   f l a g . 
 
 T r u e   i f   t h e   m a t e r i a l   i n   t h e   d r a w i n g   i s   t o   u s e   a   t e x t u r e . 
 
 
 
 %  u s e _ s p h e r e m a p   ( b o o l   t y p e ) 
 
 S p h e r e   m a p   u s e   f l a g . 
 
 T r u e   i f   t h e   m a t e r i a l   i n   t h e   d r a w i n g   i s   t o   u s e   a   s p h e r e   m a p . 
 
 I n   a d d i t i o n ,   i t   i s   t r u e   e v e n   w h e n   u s i n g   t h e   s u b - t e x t u r e   P M X   m o d e l . 
 
 
 
 %  u s e _ s u b t e x t u r e   ( b o o l   t y p e ) 
 
 S u b t e x t u r e   u s e   f l a g . 
 
 T r u e   i f   y o u   w a n t   t o   u s e   t h e   s u b - t e x t u r e   o f   P M X   m o d e l . 
 
 
 
 %  u s e _ t o o n   ( b o o l   t y p e ) 
 
 C e l   s h a d i n g   u s e   f l a g . 
 
 T r u e   i f   t h e   P M D   m o d e l . 
 
 
 
 %  o p a d d   ( b o o l   t y p e ) 
 
 A d d i t i v e   s y n t h e s i s   f l a g . 
 
 T r u e   i f   t h e   d r a w i n g   o f   t h e   o b j e c t   i s   s e t   t o   a d d i t i v e   s y n t h e s i s   m o d e . 
 
 
 
 %  V e r t e x C o u n t   ( i n t   t y p e ) 
 
 N u m b e r   o f   v e r t i c e s   o f   t h e   o b j e c t . 
 
 
 
 %  S u b s e t C o u n t   ( i n t   t y p e ) 
 
 S u b s e t   n u m b e r   o f   o b j e c t s . 
 
 
 
 %  u s e   c a s e s 
 
       b o o l   p a r t h f ; 
 
       b o o l   u s e _ t e x t u r e ; 
 
       b o o l   u s e _ t o o n ; 
 
       i n t   V e r t e x C o u n t ; 
 
 
 
 %  s u p p l e m e n t 
 
    M M D P a s s   =   " o b j e c t " ,   i f   o t h e r   t h a n   " o b j e c t _ s s " ,   t h e r e   i s   n o   g u a r a n t e e   t h a t   t h e   c o r r e c t   v a l u e s   f o r   t h e s e   p a r a m e t e r s   a r e   s e t . 
 
 
 
 
 
 2 . 9   v e r t e x   s h a d e r   s e m a n t i c s 
 
 
 
 %  _ I N D E X 
 
 
 
 I n   t h e   v e r t e x   s h a d e r ,   a n d   s e m a n t i c s   f o r   o b t a i n i n g   t h e   i n d e x   v a l u e   o f   t h e   v e r t e x . 
 
 I   c a n   b e   u s e d   i n   t h e   i n p u t   p a r a m e t e r s   o f   t h e   v e r t e x   s h a d e r .   T y p e   i n t . 
 
 
 
       %  u s e   c a s e s 
 
         
 
           V S _ O U T P U T   B a s i c _ V S   ( f l o a t 4   P o s :   P O S I T I O N ,   i n t   i n d e x :   _ I N D E X )   { 
 
                   V S _ O U T P U T   O u t ; 
 
                   O u t . P o s   =   m u l   ( P o s ,   W o r l d V i e w P r o j M a t r i x ) ; 
 
 
 
                   f l o a t   f   =   ( f l o a t )   i n d e x   /   V e r t e x C o u n t ; 
 
                   O u t . C o l o r   =   f l o a t 4   ( f ,   f ,   f ,   1 ) ; 
 
                 
 
                   r e t u r n   O u t ; 
 
           } 
 
 
 
 %  s u p p l e m e n t 
 
    B e c a u s e   y o u   a r e   o n c e   c o n v e r t e d   t o   a   f l o a t   t y p e   i n   t h e   p r o c e s s   o f   p a s s i n g   t h e   v e r t e x   s h a d e r , 
 
 I f   t h e   i n d e x   v a l u e   e x c e e d s   2   ^   2 4   =   1 6 7 7 7 2 1 6 ,   i t   i s   n o t   p o s s i b l e   t o   g e t   t h e   e x a c t   v a l u e . 
 
 
 
 
 
 2 . 1 0   m a c r o 
 
 
 
 %  M M E _ M I P M A P 
 
 
 
 M M D   i s ,   i t   i s   d e f i n e d   i f   c o r r e s p o n d   t o   t h e   m i p   m a p   t e x t u r e . 
 
 
 
 %  u s e   c a s e s 
 
 
 
           s a m p l e r   O b j T e x S a m p l e r   =   s a m p l e r _ s t a t e   { 
 
 t e x t u r e   =   < O b j e c t T e x t u r e > ; 
 
           # i f d e f   M M E _ M I P M A P 
 
                   M I P F I L T E R   =   L I N E A R ; 
 
           # e n d i f 
 
           } ; 
 
 
 
 %  s u p p l e m e n t 
 
 
 
         
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 
 3   s c r i p t 
 
 
 
 T h e   t e c h n i q u e s   a n d   p a t h ,   i t   i s   p o s s i b l e   t o   s p e c i f y   a   s p e c i a l   a n n o t a t i o n   c a l l e d   s c r i p t . 
 
 
 
       t e c h n i q u e   t e c h n i q u e   n a m e   < s t r i n g   S c r i p t   =   " c o m m a n d ;   c o m m a n d ;   . . . " ; >   { . . . } 
 
       p a s s   p a t h   n a m e   < s t r i n g   S c r i p t   =   " c o m m a n d ;   c o m m a n d ;   . . . " ; >   { . . . } 
 
 
 
 A t   r u n t i m e ,   t h e s e   c o m m a n d s   a r e   e x e c u t e d   s e q u e n t i a l l y   i n   t h e   d e s c r i b e d   o r d e r . 
 
 
 
 B y   u s i n g   t h i s   s c r i p t ,   r e n d e r i n g   t h e   t a r g e t   o f   c h a n g e   a n d   c l e a r , 
 
 I t   i s   p o s s i b l e   t o   p e r f o r m   s u c h   l o o p   p a t h . 
 
 
 
 A s   l o n g   a s   n o   s p e c i a l   p r o c e s s i n g   s u c h   a s   p o s t - e f f e c t s   u s u a l l y   s p e c i f i e d   s c r i p t   i s   n o t   r e q u i r e d . 
 
 I f   y o u   o m i t   t h e   t e c h n i q u e   o f   s c r i p t ,   s i m p l y   p a t h   t e c h n i q u e s   a r e   e x e c u t e d   i n   t h e   o r d e r . 
 
 A l s o ,   i f   i t   i s   o m i t t e d   t h e   p a t h   o f   t h e   s c r i p t ,   " D r a w   =   G e o m e t r y "   i s   e x e c u t e d . 
 
 
 
 
 
 %  c o m m a n d 
 
 
 
    R e n d e r C o l o r T a r g e t   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
    R e n d e r C o l o r T a r g e t 0   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
    R e n d e r C o l o r T a r g e t 1   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
    R e n d e r C o l o r T a r g e t 2   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
    R e n d e r C o l o r T a r g e t 3   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
 
 
 I   s e t   t h e   r e n d e r i n g   t a r g e t . 
 
 R e n d e r C o l o r T a r g e t   i s   a n   a l i a s   o f   R e n d e r C o l o r T a r g e t 0 . 
 
 
 
 N o r m a l l y ,   I   u s e   i n   R e n d e r D e p t h S t e n c i l T a r g e t   c o m m a n d   a n d   s e t . 
 
 A l s o ,   R e n d e r C o l o r T a r g e t 1   ~   3   c a n   n o t   b e   u s e d   a l o n e   a n d   m u s t   b e   u s e d   i n   a   s e t   R e n d e r C o l o r T a r g e t 0 . 
 
 
 
 T h e   a r g u m e n t ,   I   w a n t   t o   s p e c i f y   t h e   n a m e   o f   t h e   t e x t u r e   p a r a m e t e r s   t h a t   a r e   d e c l a r e d   i n   R E N D E R C O L O R T A R G E T   s e m a n t i c s . 
 
 I f   y o u   w a n t   t o   r e s e t   t o   t h e   d e f a u l t   r e n d e r i n g   t a r g e t ,   s p e c i f y   t h e   b l a n k . 
 
 
 
 N o t e   t h a t   r e n d e r   t a r g e t   s e t ,   u n l e s s   r u n   t h e s e   c o m m a n d   a g a i n , 
 
 U n t i l   c o m p l e t i o n   o f   p r o c e s s i n g   t e c h n i q u e s   t o   r e m a i n   i s   c h a n g e d . 
 
 
 
    R e n d e r D e p t h S t e n c i l T a r g e t   =   ( t e x t u r e   n a m e   o r   b l a n k ) 
 
 
 
 I   s e t   t h e   d e p t h   s t e n c i l   s u r f a c e   ( s o - c a l l e d   Z - b u f f e r ) . 
 
 N o r m a l l y ,   I   u s e   i n   R e n d e r C o l o r T a r g e t 0   c o m m a n d   a n d   s e t . 
 
 
 
 T h e   a r g u m e n t ,   I   w a n t   t o   s p e c i f y   t h e   n a m e   o f   t h e   t e x t u r e   p a r a m e t e r s   t h a t   a r e   d e c l a r e d   i n   R E N D E R D E P T H S T E N C I L T A R G E T   s e m a n t i c s . 
 
 I f   y o u   w a n t   t o   r e s e t   t o   t h e   d e f a u l t   d e p t h   s t e n c i l   s u r f a c e ,   s p e c i f y   t h e   b l a n k . 
 
 
 
    C l e a r S e t C o l o r   =   ( p a r a m e t e r   n a m e ) 
 
 
 
 I   s e t   t h e   c o l o r   t o   c l e a r   t h e   r e n d e r   t a r g e t .   ( N o t   y e t   c l e a r ) 
 
 
 
 T h e   a r g u m e n t ,   I   w a n t   t o   s p e c i f y   t h e   n a m e   o f   t h e   f l o a t 4   t y p e   o f   p a r a m e t e r s . 
 
 T h e   v a l u e   s e t   i n   t h i s   p a r a m e t e r ,   t h e   c o l o r   t o   c l e a r   t h e   r e n d e r   t a r g e t . 
 
 
 
    C l e a r S e t D e p t h   =   ( p a r a m e t e r   n a m e ) 
 
 
 
 I   s e t   t h e   Z   v a l u e   t o   c l e a r   t h e   d e p t h   s t e n c i l   s u r f a c e .   ( N o t   y e t   c l e a r ) 
 
 
 
 T h e   a r g u m e n t ,   I   s p e c i f y   t h e   n a m e   o f   t h e   f l o a t   t y p e   o f   t h e   p a r a m e t e r . 
 
 T h e   v a l u e   s e t   i n   t h i s   p a r a m e t e r ,   t h e   Z   v a l u e   t o   c l e a r   t h e   d e p t h   s t e n c i l   s u r f a c e . 
 
 
 
    C l e a r   =   C o l o r 
 
 
 
 I   c l e a r   t h e   r e n d e r   t a r g e t . 
 
 T h e   c o l o r   t o   c l e a r ,   t h e   v a l u e   s e t   i n   C l e a r S e t C o l o r   c o m m a n d   i s   u s e d . 
 
 
 
    C l e a r   =   D e p t h 
 
 
 
 I   c l e a r   t h e   d e p t h   s t e n c i l   s u r f a c e . 
 
 T h e   Z   v a l u e   t o   c l e a r ,   t h e   v a l u e   s e t   i n   C l e a r S e t D e p t h   c o m m a n d   i s   u s e d . 
 
 
 
    S c r i p t E x t e r n a l   =   C o l o r 
 
 
 
 I   d r a w   t h e   o t h e r   o b j e c t . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   o n   t h e   t e c h n i q u e   o f   t h e   s c r i p t . 
 
 
 
 T h i s   i s ,   i n   S c r i p t O r d e r   a n n o t a t i o n   o f   p o s t   e f f e c t s   ( S T A N D A R D S G L O B A L   p a r a m e t e r s 
 
 " p o s t p r o c e s s "   i s   I   c a n   o n l y   r u n   i n   t h e   s p e c i f i e d   e f f e c t   f i l e ) . 
 
 
 
 T y p i c a l l y ,   t h e   p o s t - e f f e c t s ,   i t   d i d   o n   s e t   t e x t u r e   f o r   i n p u t   t o   t h e   r e n d e r   t a r g e t , 
 
 T o   t h e   t e x t u r e ,   I   t o   r e n d e r   o t h e r   o b j e c t s . 
 
 I n   t h i s ,   w h e n   t o   r e n d e r   t h e   o t h e r   o b j e c t s ,   a n d   t o   e x e c u t e   t h e   c o m m a n d . 
 
 ( S e e   t h e   p o s t   e f f e c t s   o f   T i p s ) 
 
 
 
 T h e   p o s t - e f f e c t s ,   o n   t h e   t e c h n i q u e   o f   t h e   s c r i p t ,   i t   m u s t   b e   a l w a y s   p e r f o r m e d   o n l y   o n e   t i m e . 
 
 
 
    P a s s   =   ( p a t h   n a m e ) 
 
 
 
 T o   p e r f o r m   t h e   s p e c i f i e d   p a t h . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   o n   t h e   t e c h n i q u e   o f   t h e   s c r i p t . 
 
 
 
 I f   y o u   s p e c i f y   a   s c r i p t   t e c h n i q u e ,   u n l e s s   e x p l i c i t l y   u s e   t h i s   c o m m a n d , 
 
 A n y   p a t h   i s   a l s o   n o t   r u n . 
 
 
 
    L o o p B y C o u n t   =   ( p a r a m e t e r   n a m e ) 
 
    L o o p E n d   = 
 
 
 
 O n l y   t h e   n u m b e r   o f   t i m e s   s p e c i f i e d ,   t o   l o o p   a   p a r t   o f   t h e   s c r i p t . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   o n   t h e   t e c h n i q u e   o f   t h e   s c r i p t . 
 
 
 
 T h e   a r g u m e n t ,   n u m e r i c   ( i n t ,   b o o l ,   f l o a t )   I   s p e c i f y   t h e   n a m e   o f   t h e   p a r a m e t e r   o f . 
 
 O n l y   t h e   n u m b e r   o f   t i m e s   o f   t h e   v a l u e   s e t   i n   t h i s   p a r a m e t e r ,   t h e   c o m m a n d   s t r i n g   i n   f r o m   L o o p B y C o u n t   t o   L o o p E n d 
 
 I s   r e p e a t e d l y   e x e c u t e d . 
 
 L o o p   c a n   b e   n e s t e d . 
 
 
 
 I n   t h e   f o l l o w i n g   e x a m p l e ,   a f t e r   3   p a s s e s   p 0   i s   p e r f o r m e d ,   t h e   p a t h   p 1   i s   p e r f o r m e d . 
 
         
 
           /   * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
           i n t   C o u n t   =   3 ; 
 
         
 
           t e c h n i q u e   T S h a d e r   < 
 
                   s t r i n g   S c r i p t   = 
 
                           " L o o p B y C o u n t   =   C o u n t ; " 
 
                           " P a s s   =   p 0 ; " 
 
                           " L o o p E n d   = ; " 
 
                           " P a s s   =   p 1 ; " ; 
 
           >   { 
 
           /   * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
 
 
    L o o p G e t I n d e x   =   ( p a r a m e t e r   n a m e ) 
 
 
 
 T h e   v a l u e   o f   t h e   l o o p   c o u n t e r   i n   t h e   l o o p   i s   s e t   t o   t h e   s p e c i f i e d   p a r a m e t e r s . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   b e t w e e n   f r o m   L o o p B y C o u n t   t o   L o o p E n d . 
 
 
 
    D r a w   =   G e o m e t r y 
 
 
 
 I   d r a w   t h e   o b j e c t . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   o n   t h e   p a t h   o f   t h e   s c r i p t . 
 
 
 
 I f   y o u   o m i t   t h e   p a t h   o f   t h e   s c r i p t ,   t h i s   c o m m a n d   i s   e x e c u t e d . 
 
 I f   y o u   h a v e   s p e c i f i e d   a   " s c e n e "   t o   S c r i p t C l a s s   o f   S T A N D A R D S G L O B A L , 
 
 I s   n o t   t o   b e   r u n   t h i s   c o m m a n d . 
 
 
 
    D r a w   =   B u f f e r 
 
 
 
 O f   s i z e   t h a t   m a t c h e s   t h e   r e n d e r   t a r g e t   o f   t h e   s c r e e n ,   I   d r a w   a   r e c t a n g u l a r   p o l y g o n . 
 
 T h i s   c o m m a n d   c a n   n o t   b e   u s e d   o n l y   o n   t h e   p a t h   o f   t h e   s c r i p t . 
 
 
 
 I   w a n t   t o   u s e   i n   t h e   p o s t - e f f e c t s   a n d   p r e - e f f e c t s . 
 
 I f   y o u   h a v e   s p e c i f i e d   t h e   " o b j e c t "   t o   S c r i p t C l a s s   o f   S T A N D A R D S G L O B A L , 
 
 I s   n o t   t o   b e   r u n   t h i s   c o m m a n d . 
 
 
 
    R e n d e r P o r t   =   * 
 
 
 
 N o t   s u p p o r t e d . 
 
 
 
 
 
 %  u s e   c a s e s 
 
           t e c h n i q u e   T S h a d e r   < 
 
                   /   *   T w o   s t r i n g   r e p r e s e n t a t i o n   ( " ~ "   " ~ " )   I f   t h e r e   i s   o n l y   b l a n k   c h a r a c t e r s   b e t w e e n , 
 
                         B e c a u s e   i t   i s   c o n s i d e r e d   a s   o n e   c o n t i n u o u s   s t r i n g ,   c a n   b e   d e s c r i b e d   b y   d i v i d i n g   a s   f o l l o w s   *   / 
 
                   s t r i n g   S c r i p t   = 
 
                           " R e n d e r C o l o r T a r g e t 0   =   R e n d e r T a r g e t ; " 
 
           " R e n d e r D e p t h S t e n c i l T a r g e t   =   D e p t h B u f f e r ; " 
 
           " C l e a r S e t C o l o r   =   C l e a r C o l o r ; " 
 
           " C l e a r S e t D e p t h   =   C l e a r D e p t h ; " 
 
           " C l e a r   =   C o l o r ; " 
 
           " C l e a r   =   D e p t h ; " 
 
           " S c r i p t E x t e r n a l   =   c o l o r ; " 
 
           " P a s s   =   P 0 ; " ; 
 
           >   { 
 
                   p a s s   P 0   < s t r i n g   S c r i p t   =   " R e n d e r C o l o r T a r g e t 0   = ;   R e n d e r D e p t h S t e n c i l T a r g e t   = ;   D r a w   =   B u f f e r ; " ; >   { 
 
                           . . . 
 
                   } 
 
           } 
 
 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 
 
 4   T i p s 
 
 
 
 %  I   u s e   t h e   M M D   s t a n d a r d   s h a d e r 
 
 
 
 O n l y   a   p o r t i o n   o f   t h e   d r a w i n g   o b j e c t s ,   u s i n g   t h e   e f f e c t , 
 
 I f   y o u   w a n t   t o   u s e   t h e   M M D   s t a n d a r d   s h a d e r s   i n   t h e   o t h e r   d r a w i n g , 
 
 T h e   s c e n e   o f   t h e   t e c h n i q u e s   t h a t   y o u   w a n t   t o   u s e   t h e   M M D   s t a n d a r d   s h a d e r ,   i t   m a y   h a v e   t o   d e s c r i b e   t h e   e f f e c t   f i l e . 
 
 ( S e e   " 1 . 2   t e c h n i q u e   o f   a n n o t a t i o n " ) 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * *   / 
 
           /   *   I f   t h e r e   i s   o n l y   t h i s   t e c h n i q u e   t o   t h e   e f f e c t   f i l e , 
 
                 *   T h a n   t h e   o b j e c t   d r a w i n g   ( a t   t h e   t i m e   o f   s e l f - s h a d o w i n g   O N )   i s   d r a w n   i n   M M D   s t a n d a r d   s h a d e r   / 
 
               t e c h n i q u e   T e c h 1   < s t r i n g   M M D P a s s   =   " o b j e c t _ s s " ; >   { 
 
                       p a s s   P a s s 1   { 
 
                               . . . 
 
                       } 
 
                       p a s s   P a s s 2   { 
 
                               . . . 
 
                       } 
 
               } 
 
           /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * *   / 
 
 
 
 I n   a d d i t i o n ,   b e c a u s e   t h e   d e f a u l t   s h a d e r   p a t h   i s   t h e   s h a d e r   o f   M M D   s t a n d a r d , 
 
 A s   f o l l o w s ,   I f   y o u   d o   n o t   s e t   t h e   V e r t e x S h a d e r   a n d   P i x e l S h a d e r   o f   p a t h , 
 
 M M D   s t a n d a r d s   s h a d e r   i s   u s e d   t o   d r a w   t h e   p a t h . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * *   / 
 
               t e c h n i q u e   T e c h 1   < s t r i n g   M M D P a s s   =   " o b j e c t _ s s " ; >   { 
 
                       p a s s   P a s s 1   { 
 
                           / /   V e r t e x S h a d e r   =   x x x 
 
                           / /   P i x e l S h a d e r   =   x x x 
 
                       } 
 
               } 
 
           /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * *   / 
 
 
 
 
 
 %  e m p t y   t e c h n i q u e 
 
 
 
 A s   f o l l o w s ,   e m p t y   t h e   t e c h n i q u e   i s   n o t   p e r f o r m e d   a t   a l l   t h e   d r a w i n g   i n   t h a t   t e c h n i q u e . 
 
 T h a t   w a y ,   i t   i s   p o s s i b l e   t o   s u p p r e s s   t h e   d r a w i n g   o f   s o m e   o b j e c t s   o r   a l l . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * *   / 
 
               t e c h n i q u e   S h a d o w T e c h   < s t r i n g   M M D P a s s   =   " s h a d o w " ; >   { 
 
                   
 
               } 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * *   / 
 
 
 
 
 
 T h e   O N   /   O F F   t h e   p a t h   i n   t h e   p r e s e n c e   o f   a n   o b j e c t   %
 
 
 
 W h e n   y o u   w r i t e   a   s c r i p t   a s   f o l l o w s ,   o n l y   w h i l e   t h e   d i s p l a y   o f   a   p a r t i c u l a r   o b j e c t   i s   O N 
 
 I t   i s   p o s s i b l e   t o   e x e c u t e   t h e   p a t h . 
 
 T h i s   i s   u t i l i z e d   t o   b e   c o n s t r u e d   t o   1   a n d   0   a s   a   n u m e r i c a l   v a l u e   i s   b o o l e a n   t r u e   /   f a l s e . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * *   / 
 
               b o o l   f l a g :   C O N T R O L O B J E C T   < s t r i n g   n a m e   =   " a a a . x " ; > ; 
 
             
 
               t e c h n i q u e   T e c h 1   < 
 
                       s t r i n g   S c r i p t   = 
 
                               " L o o p B y C o u n t   =   f l a g ; " 
 
                               " P a s s   =   P a s s 1 ; " 
 
                               " L o o p E n d   = ; " 
 
                                 ; 
 
               >   { 
 
                       p a s s   P a s s 1   { 
 
                               . . . 
 
                       } 
 
               } 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * *   / 
 
 
 
 
 
 %  S h a r e   p a r a m e t e r s   b e t w e e n   t h e   e f f e c t   f i l e 
 
 
 
 T y p i c a l l y ,   t h e   p a r a m e t e r s   a r e   n o t   s h a r e d   b e t w e e n   d i f f e r e n t   e f f e c t s   f i l e . 
 
 H o w e v e r ,   b y   s p e c i f y i n g   t h e   " s h a r e d "   k e y w o r d   i n   t h e   d e c l a r a t i o n   o f   p a r a m e t e r s , 
 
 I t   i s   p o s s i b l e   t o   s h a r e   t h e   p a r a m e t e r s   o f   t h e   s a m e   n a m e   a c r o s s   t h e   e f f e c t   f i l e . 
 
 
 
 I n   t h e   f o l l o w i n g   e x a m p l e ,   a   t e x t u r e   i s   g e n e r a t e d   b y   e f f e c t 1 . f x ,   c a n   b e   r e f e r e n c e d   b y   e f f e c t 2 . f x . 
 
 T h u s ,   i t   i s   n e c e s s a r y   t o   s p e c i f y   a   " s h a r e d "   k e y w o r d   i n   b o t h   p a r a m e t e r   d e c l a r a t i o n . 
 
 M o r e o v e r ,   n o t   o n l y   t h e   n a m e ,   t h e   t y p e   n a m e   a n d   s e m a n t i c s   m u s t   a l s o   m a t c h . 
 
 
 
 /   * * * * * * * * * * * * * *   E f f e c t 1 . f x   * * * * * * * * * * * * * * * * * *   / 
 
             
 
 s h a r e d   t e x t u r e   S h a d o w B u f f e r :   R E N D E R C O L O R T A R G E T   < 
 
                       f l o a t 2   V i e w P o r t R a t i o   =   { 2 . 0 , 2 . 0 } ; 
 
                       i n t   M i p L e v e l s   =   1 ; 
 
                       s t r i n g   F o r m a t   =   " A 8 R 8 G 8 B 8 " ; 
 
               > ; 
 
             
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
 
 
 /   * * * * * * * * * * * * * *   E f f e c t 2 . f x   * * * * * * * * * * * * * * * * * *   / 
 
             
 
 s h a r e d   t e x t u r e   S h a d o w B u f f e r :   R E N D E R C O L O R T A R G E T ; 
 
             
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   / 
 
 
 
 
 
 %  i f   s t a t e m e n t 
 
 
 
 I f   y o u   w a n t   t o   d r a w   i n   h i g h   s p e e d ,   w h e n   y o u   a r e   w r i t i n g   a   s h a d e r ,   t h e   c o n d i t i o n a l   b r a n c h   l i k e   a s   m u c h   a s   p o s s i b l e   i f   s t a t e m e n t 
 
 B e t t e r   y o u   d o   n o t   u s e   i s . 
 
 
 
 I f   i n   t h e   p r e s e n c e   o r   a b s e n c e   o f   t e x t u r e ,   s u c h   a s   s w i t c h i n g   t h e   p r o c e s s i n g   o f   s h a d e r , 
 
 b y   r e f e r r i n g   t o   t h e   u s e _ t e x t u r e   p a r a m e t e r s ,   r a t h e r   t h a n   c o n d i t i o n a l   b r a n c h   i n   t h e   i f   s t a t e m e n t   i n   t h e   s h a d e r , 
 
 I n   t h a t   t h e r e   i s   n o   s u b s e t   a   s u b s e t   t e x t u r e   t h e r e ,   m o r e   c a n   b e   d r a w n   a s   f a s t   y o u   w o u l d   d i v i d e   t h e   t e c h n i q u e   i t s e l f . 
 
 
 
 
 
 %  u n i f o r m   k e y w o r d 
 
 
 
       S p e c i f y i n g   a   " u n i f o r m "   k e y w o r d   a r g u m e n t   o f   t h e   f u n c t i o n   d e c l a r a t i o n ,   i t   i s   p o s s i b l e   t o   g i v e   t h e   v a l u e   o f   t h e   a r g u m e n t   a s   a   c o m p i l e - t i m e   c o n s t a n t . 
 
 
 
 I n   t h e   f o l l o w i n g   e x a m p l e ,   t h e   i f   s t a t e m e n t   i n   t h e   B a s i c _ P S   ( )   i s   r e m o v e d   a t   c o m p i l e   t i m e , 
 
 S p e e d   r e d u c t i o n   d u e   t o   c o n d i t i o n a l   b r a n c h   i s   a v o i d e d   ( m a y b e ) . 
 
 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * * * * * * * * *   / 
 
 f l o a t 4   B a s i c _ P S   ( V S _ O U T P U T   I N ,   u n i f o r m   b o o l   u s e T e x t u r e ) :   C O L O R 0 
 
           { 
 
                   f l o a t 4   C o l o r   =   I N . D i f f u s e ; 
 
                   i f   ( u s e T e x t u r e )   { 
 
                           C o l o r   *   =   t e x 2 D   ( O b j T e x S a m p l e r ,   I N . T e x ) ; 
 
                   } 
 
                   . . . 
 
           } 
 
         
 
           t e c h n i q u e   T e c h W i t h T e x   { 
 
                   p a s s   P 1   { 
 
                           /   *   U s e T e x t u r e   =   c o m p i l e d   s h a d e r s   i n   t r u e   *   / 
 
                           P i x e l S h a d e r   =   c o m p i l e   p s _ 2 _ 0   B a s i c _ P S   ( t r u e ) ; 
 
                           . . . 
 
                   } 
 
           } 
 
         
 
           t e c h n i q u e   T e c h W i t h o u t T e x   { 
 
                   p a s s   P 1   { 
 
                           /   *   U s e T e x t u r e   =   c o m p i l e d   s h a d e r s   i n   f a l s e   *   / 
 
                           P i x e l S h a d e r   =   c o m p i l e   p s _ 2 _ 0   B a s i c _ P S   ( f a l s e ) ; 
 
                           . . . 
 
                   } 
 
           } 
 
 /   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *   * * * * * * * * * * * * * * * * * *   / 
 
 
 
 
 
 %  J a p a n e s e   u s e   o f   t h e   e f f e c t   i n   t h e   f i l e 
 
 
 
 B a s i c a l l y ,   i n   a   n o n - c o m m e n t   p o r t i o n ,   i t   i s   n o t   r e c o m m e n d e d   t h a t   y o u   u s e   t h e   J a p a n e s e   c h a r a c t e r s   i n   t h e   e f f e c t   f i l e . 
 
 
 
 D a r e   I f   u s e d ,   i t   c a n   b e   n o t e d   t h e   c h a r a c t e r   c o d e . 
 
 S u c h   a s   o b j e c t   n a m e   o f   t h e   p a t h   a n d   t h e   c o n t r o l   o b j e c t   o f   i m a g e   f i l e   f o r   t h e   t e x t u r e   g e n e r a t i o n , 
 
 I f   y o u   w a n t   t o   u s e   t h e   J a p a n e s e   t o   s p e c i f y   t h e   f i l e   n a m e ,   t h e   c h a r a c t e r   c o d e   o f   t h e   e f f e c t   f i l e 
 
 S u r e   i t   m u s t   b e   a   S h i f t - J I S . 
 
 
 
 
 
 %  P o s t   E f f e c t s 
 
 
 
 I f   y o u   w a n t   t o   c r e a t e   a n   e f f e c t   f i l e   f o r   p o s t   e f f e c t s , 
 
 T h e r e   i s   a   n e e d   o f   t h e   f o l l o w i n g   p a r a m e t e r s   a r e   d e c l a r e d   i n   e f f e c t   f i l e . 
 
 ( S e e   " %  S T A N D A R D S G L O B A L " ) 
 
 
 
           f l o a t   S c r i p t :   S T A N D A R D S G L O B A L   < 
 
                   s t r i n g   S c r i p t O u t p u t   =   " c o l o r " ; 
 
                   s t r i n g   S c r i p t C l a s s   =   " s c e n e " ; 
 
                   s t r i n g   S c r i p t O r d e r   =   " p o s t p r o c e s s " ; 
 
           >   =   0 . 8 ; 
 
 
 
 
 
 A l s o ,   i n   a   t y p i c a l   p o s t - e f f e c t s ,   i   p e r f o r m s   t h e   f o l l o w i n g   p r o c e s s i n g   i n   t h e   s c r i p t   t e c h n i q u e s . 
 
 
 
 ( 1 )   T h e   r e n d e r   t a r g e t   i s   c h a n g e d   t o   o w n   t e x t u r e   a n d   c l e a r . 
 
             
 
 S c r i p t   e x a m p l e : 
 
                   " R e n d e r C o l o r T a r g e t 0   =   ( R E N D E R C O L O R T A R G E T   t e x t u r e ) ; " 
 
 " R e n d e r D e p t h S t e n c i l T a r g e t   =   ( R E N D E R D E P T H S T E N C I L T A R G E T   t e x t u r e ) ; " 
 
 " C l e a r S e t C o l o r   =   ( c l e a r   c o l o r ) ; " 
 
 " C l e a r S e t D e p t h   =   ( Z   v a l u e   o f   c l e a r ) ; " 
 
 " C l e a r   =   C o l o r ; " 
 
 " C l e a r   =   D e p t h ; " 
 
 
 
 ( 2 )   I   d r a w   p r e - e f f e c t s ,   o b j e c t s ,   o t h e r   p o s t   e f f e c t s . 
 
 I n   t h i s   c a s e ,   d r a w i n g   r e s u l t s   a r e   s t o r e d   i n   a   t e x t u r e   t h a t   i s   s p e c i f i e d   i n   ( 1 ) . 
 
 
 
 S c r i p t   e x a m p l e : 
 
 " S c r i p t E x t e r n a l   =   C o l o r ; " 
 
 
 
 ( 3 )   r e n d e r   t a r g e t   w a s   r e t u r n e d   t o   t h e   o r i g i n a l ,   a s   i n p u t   t e x t u r e   r e n d e r i n g   r e s u l t ,   a n d   e x e c u t e s   t h e   p a t h . 
 
 
 
 S c r i p t   e x a m p l e : 
 
                   " R e n d e r C o l o r T a r g e t 0   = ; " 
 
 " R e n d e r D e p t h S t e n c i l T a r g e t   = ; " 
 
 " P a s s   =   ( p a t h   1 ) ; " 
 
 " P a s s   =   ( p a t h   2 ) ; " 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 